@trionesdev/antd-mobile-react 0.0.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/LICENSE +21 -0
  2. package/dist/ActionSheet/demo/base.d.ts +3 -0
  3. package/dist/ActionSheet/demo/base.js +39 -0
  4. package/dist/ActionSheet/index.d.ts +3 -0
  5. package/dist/ActionSheet/index.js +2 -0
  6. package/dist/Alert/demo/base.d.ts +3 -0
  7. package/dist/Alert/demo/base.js +56 -0
  8. package/dist/Alert/index.d.ts +3 -0
  9. package/dist/Alert/index.js +2 -0
  10. package/dist/Avatar/demo/base.d.ts +7 -0
  11. package/dist/Avatar/demo/base.js +109 -0
  12. package/dist/Avatar/demo/style.scss +6 -0
  13. package/dist/Avatar/index.d.ts +3 -0
  14. package/dist/Avatar/index.js +2 -0
  15. package/dist/Badge/demo/base.d.ts +7 -0
  16. package/dist/Badge/demo/base.js +167 -0
  17. package/dist/Badge/demo/base.scss +6 -0
  18. package/dist/Badge/index.d.ts +3 -0
  19. package/dist/Badge/index.js +2 -0
  20. package/dist/Button/button.d.ts +53 -0
  21. package/dist/Button/button.js +66 -0
  22. package/dist/Button/demo/base.d.ts +3 -0
  23. package/dist/Button/demo/base.js +163 -0
  24. package/dist/Button/index.d.ts +3 -0
  25. package/dist/Button/index.js +2 -0
  26. package/dist/Button/style.scss +231 -0
  27. package/dist/Calendar/calendar-grid.d.ts +27 -0
  28. package/dist/Calendar/calendar-grid.js +164 -0
  29. package/dist/Calendar/calendar-header.d.ts +7 -0
  30. package/dist/Calendar/calendar-header.js +42 -0
  31. package/dist/Calendar/calendar-range.d.ts +10 -0
  32. package/dist/Calendar/calendar-range.js +57 -0
  33. package/dist/Calendar/calendar.d.ts +10 -0
  34. package/dist/Calendar/calendar.js +49 -0
  35. package/dist/Calendar/demo/calendar.d.ts +3 -0
  36. package/dist/Calendar/demo/calendar.js +10 -0
  37. package/dist/Calendar/demo/grid.d.ts +3 -0
  38. package/dist/Calendar/demo/grid.js +12 -0
  39. package/dist/Calendar/demo/touch-grid.d.ts +3 -0
  40. package/dist/Calendar/demo/touch-grid.js +8 -0
  41. package/dist/Calendar/index.d.ts +11 -0
  42. package/dist/Calendar/index.js +8 -0
  43. package/dist/Calendar/style.scss +85 -0
  44. package/dist/Calendar/touchable-calendar-grid.d.ts +14 -0
  45. package/dist/Calendar/touchable-calendar-grid.js +395 -0
  46. package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +10 -0
  47. package/dist/CalendarDatetimePicker/CalendarDatetimePicker.js +156 -0
  48. package/dist/CalendarDatetimePicker/DateTimeSwitch.d.ts +14 -0
  49. package/dist/CalendarDatetimePicker/DateTimeSwitch.js +39 -0
  50. package/dist/CalendarDatetimePicker/demo/base.d.ts +3 -0
  51. package/dist/CalendarDatetimePicker/demo/base.js +41 -0
  52. package/dist/CalendarDatetimePicker/index.d.ts +3 -0
  53. package/dist/CalendarDatetimePicker/index.js +2 -0
  54. package/dist/CalendarDatetimePicker/style.scss +54 -0
  55. package/dist/CalendarDatetimePicker/types.d.ts +5 -0
  56. package/dist/CalendarDatetimePicker/types.js +6 -0
  57. package/dist/CalendarPicker/calendar-picker.d.ts +4 -0
  58. package/dist/CalendarPicker/calendar-picker.js +87 -0
  59. package/dist/CalendarPicker/calendar-range-picker.d.ts +4 -0
  60. package/dist/CalendarPicker/calendar-range-picker.js +87 -0
  61. package/dist/CalendarPicker/demo/base.d.ts +3 -0
  62. package/dist/CalendarPicker/demo/base.js +66 -0
  63. package/dist/CalendarPicker/index.d.ts +9 -0
  64. package/dist/CalendarPicker/index.js +5 -0
  65. package/dist/CalendarPicker/style.scss +31 -0
  66. package/dist/CalendarPicker/types.d.ts +21 -0
  67. package/dist/CalendarPicker/types.js +1 -0
  68. package/dist/Card/demo/base.d.ts +4 -0
  69. package/dist/Card/demo/base.js +65 -0
  70. package/dist/Card/demo/base.scss +18 -0
  71. package/dist/Card/index.d.ts +3 -0
  72. package/dist/Card/index.js +2 -0
  73. package/dist/CascaderPicker/demo/base.d.ts +3 -0
  74. package/dist/CascaderPicker/demo/base.js +85 -0
  75. package/dist/CascaderPicker/index.d.ts +3 -0
  76. package/dist/CascaderPicker/index.js +2 -0
  77. package/dist/CascaderView/demo/async.d.ts +3 -0
  78. package/dist/CascaderView/demo/async.js +41 -0
  79. package/dist/CascaderView/demo/base.d.ts +3 -0
  80. package/dist/CascaderView/demo/base.js +62 -0
  81. package/dist/CascaderView/demo/value.d.ts +3 -0
  82. package/dist/CascaderView/demo/value.js +63 -0
  83. package/dist/CascaderView/index.d.ts +3 -0
  84. package/dist/CascaderView/index.js +2 -0
  85. package/dist/Cell/demo/base.d.ts +3 -0
  86. package/dist/Cell/demo/base.js +13 -0
  87. package/dist/Cell/index.d.ts +3 -0
  88. package/dist/Cell/index.js +2 -0
  89. package/dist/Checkbox/demo/base.d.ts +6 -0
  90. package/dist/Checkbox/demo/base.js +43 -0
  91. package/dist/Checkbox/demo/disabled.d.ts +3 -0
  92. package/dist/Checkbox/demo/disabled.js +19 -0
  93. package/dist/Checkbox/index.d.ts +3 -0
  94. package/dist/Checkbox/index.js +2 -0
  95. package/dist/ConfigProvider/demo/base.d.ts +6 -0
  96. package/dist/ConfigProvider/demo/base.js +24 -0
  97. package/dist/ConfigProvider/index.d.ts +3 -0
  98. package/dist/ConfigProvider/index.js +2 -0
  99. package/dist/DemoBlock/index.d.ts +10 -0
  100. package/dist/DemoBlock/index.js +15 -0
  101. package/dist/DemoBlock/index.scss +20 -0
  102. package/dist/DemoDescription/index.d.ts +6 -0
  103. package/dist/DemoDescription/index.js +7 -0
  104. package/dist/DemoDescription/index.scss +3 -0
  105. package/dist/Descriptions/demo/base.d.ts +3 -0
  106. package/dist/Descriptions/demo/base.js +102 -0
  107. package/dist/Descriptions/demo/vertical.d.ts +3 -0
  108. package/dist/Descriptions/demo/vertical.js +70 -0
  109. package/dist/Descriptions/index.d.ts +3 -0
  110. package/dist/Descriptions/index.js +2 -0
  111. package/dist/Divider/demo/base.d.ts +3 -0
  112. package/dist/Divider/demo/base.js +35 -0
  113. package/dist/Divider/index.d.ts +3 -0
  114. package/dist/Divider/index.js +2 -0
  115. package/dist/Ellipsis/demo/base.d.ts +3 -0
  116. package/dist/Ellipsis/demo/base.js +81 -0
  117. package/dist/Ellipsis/index.d.ts +3 -0
  118. package/dist/Ellipsis/index.js +2 -0
  119. package/dist/Empty/demo/base.d.ts +3 -0
  120. package/dist/Empty/demo/base.js +38 -0
  121. package/dist/Empty/index.d.ts +3 -0
  122. package/dist/Empty/index.js +2 -0
  123. package/dist/ErrorBlock/demo/base.d.ts +3 -0
  124. package/dist/ErrorBlock/demo/base.js +23 -0
  125. package/dist/ErrorBlock/index.d.ts +4 -0
  126. package/dist/ErrorBlock/index.js +3 -0
  127. package/dist/Footer/demo/base.d.ts +6 -0
  128. package/dist/Footer/demo/base.js +81 -0
  129. package/dist/Footer/index.d.ts +3 -0
  130. package/dist/Footer/index.js +2 -0
  131. package/dist/Form/demo/base.d.ts +3 -0
  132. package/dist/Form/demo/base.js +99 -0
  133. package/dist/Form/demo/input.d.ts +3 -0
  134. package/dist/Form/demo/input.js +39 -0
  135. package/dist/Form/index.d.ts +3 -0
  136. package/dist/Form/index.js +2 -0
  137. package/dist/Grid/demo/base.d.ts +7 -0
  138. package/dist/Grid/demo/base.js +46 -0
  139. package/dist/Grid/demo/base.scss +7 -0
  140. package/dist/Grid/index.d.ts +3 -0
  141. package/dist/Grid/index.js +2 -0
  142. package/dist/Icon/check-icon.d.ts +3 -0
  143. package/dist/Icon/check-icon.js +10 -0
  144. package/dist/Icon/demo/base.d.ts +6 -0
  145. package/dist/Icon/demo/base.js +41 -0
  146. package/dist/Image/broken-image-icon.d.ts +2 -0
  147. package/dist/Image/broken-image-icon.js +11 -0
  148. package/dist/Image/demo/base.d.ts +4 -0
  149. package/dist/Image/demo/base.js +101 -0
  150. package/dist/Image/demo/base.scss +4 -0
  151. package/dist/Image/image-icon.d.ts +2 -0
  152. package/dist/Image/image-icon.js +11 -0
  153. package/dist/Image/image.d.ts +19 -0
  154. package/dist/Image/image.js +113 -0
  155. package/dist/Image/index.d.ts +4 -0
  156. package/dist/Image/index.js +3 -0
  157. package/dist/Image/lazy-detector.d.ts +6 -0
  158. package/dist/Image/lazy-detector.js +22 -0
  159. package/dist/Image/style.scss +30 -0
  160. package/dist/ImagesPreview/ImagesPreview.d.ts +12 -0
  161. package/dist/ImagesPreview/ImagesPreview.js +83 -0
  162. package/dist/ImagesPreview/demo/base.d.ts +3 -0
  163. package/dist/ImagesPreview/demo/base.js +30 -0
  164. package/dist/ImagesPreview/index.d.ts +3 -0
  165. package/dist/ImagesPreview/index.js +2 -0
  166. package/dist/ImagesPreview/style.scss +34 -0
  167. package/dist/ImagesWall/CameraModal.d.ts +6 -0
  168. package/dist/ImagesWall/CameraModal.js +23 -0
  169. package/dist/ImagesWall/ImagesWall.d.ts +29 -0
  170. package/dist/ImagesWall/ImagesWall.js +225 -0
  171. package/dist/ImagesWall/demo/base.d.ts +3 -0
  172. package/dist/ImagesWall/demo/base.js +29 -0
  173. package/dist/ImagesWall/index.d.ts +3 -0
  174. package/dist/ImagesWall/index.js +2 -0
  175. package/dist/ImagesWall/style.scss +70 -0
  176. package/dist/Input/demo/base.d.ts +3 -0
  177. package/dist/Input/demo/base.js +29 -0
  178. package/dist/Input/index.d.ts +3 -0
  179. package/dist/Input/index.js +2 -0
  180. package/dist/InputNumber/demo/base.d.ts +3 -0
  181. package/dist/InputNumber/demo/base.js +13 -0
  182. package/dist/InputNumber/index.d.ts +3 -0
  183. package/dist/InputNumber/index.js +2 -0
  184. package/dist/Mask/demo/base.d.ts +3 -0
  185. package/dist/Mask/demo/base.js +29 -0
  186. package/dist/Mask/index.d.ts +3 -0
  187. package/dist/Mask/index.js +2 -0
  188. package/dist/NavBar/demo/base.d.ts +4 -0
  189. package/dist/NavBar/demo/base.js +70 -0
  190. package/dist/NavBar/demo/base.scss +5 -0
  191. package/dist/NavBar/index.d.ts +3 -0
  192. package/dist/NavBar/index.js +2 -0
  193. package/dist/NoticeBar/demo/base.d.ts +3 -0
  194. package/dist/NoticeBar/demo/base.js +90 -0
  195. package/dist/NoticeBar/index.d.ts +3 -0
  196. package/dist/NoticeBar/index.js +2 -0
  197. package/dist/PageIndicator/demo/base.d.ts +3 -0
  198. package/dist/PageIndicator/demo/base.js +41 -0
  199. package/dist/PageIndicator/index.d.ts +3 -0
  200. package/dist/PageIndicator/index.js +2 -0
  201. package/dist/Picker/demo/base.d.ts +3 -0
  202. package/dist/Picker/demo/base.js +56 -0
  203. package/dist/Picker/index.d.ts +3 -0
  204. package/dist/Picker/index.js +2 -0
  205. package/dist/PickerView/demo/base.d.ts +3 -0
  206. package/dist/PickerView/demo/base.js +36 -0
  207. package/dist/PickerView/index.d.ts +3 -0
  208. package/dist/PickerView/index.js +2 -0
  209. package/dist/Popup/demo/base.d.ts +3 -0
  210. package/dist/Popup/demo/base.js +99 -0
  211. package/dist/Popup/index.d.ts +3 -0
  212. package/dist/Popup/index.js +2 -0
  213. package/dist/Progress/Progress.d.ts +37 -0
  214. package/dist/Progress/Progress.js +52 -0
  215. package/dist/Progress/ProgressCircle.d.ts +17 -0
  216. package/dist/Progress/ProgressCircle.js +148 -0
  217. package/dist/Progress/ProgressLine.d.ts +15 -0
  218. package/dist/Progress/ProgressLine.js +87 -0
  219. package/dist/Progress/demo/base.d.ts +3 -0
  220. package/dist/Progress/demo/base.js +73 -0
  221. package/dist/Progress/index.d.ts +3 -0
  222. package/dist/Progress/index.js +2 -0
  223. package/dist/Progress/style.scss +33 -0
  224. package/dist/Progress/types.d.ts +4 -0
  225. package/dist/Progress/types.js +2 -0
  226. package/dist/Radio/demo/base.d.ts +4 -0
  227. package/dist/Radio/demo/base.js +85 -0
  228. package/dist/Radio/demo/base.scss +4 -0
  229. package/dist/Radio/index.d.ts +3 -0
  230. package/dist/Radio/index.js +2 -0
  231. package/dist/Rate/demo/base.d.ts +3 -0
  232. package/dist/Rate/demo/base.js +59 -0
  233. package/dist/Rate/index.d.ts +3 -0
  234. package/dist/Rate/index.js +2 -0
  235. package/dist/Result/demo/base.d.ts +3 -0
  236. package/dist/Result/demo/base.js +57 -0
  237. package/dist/Result/index.d.ts +3 -0
  238. package/dist/Result/index.js +2 -0
  239. package/dist/SafeArea/demo/base.d.ts +3 -0
  240. package/dist/SafeArea/demo/base.js +17 -0
  241. package/dist/SafeArea/demo/base.scss +18 -0
  242. package/dist/SafeArea/index.d.ts +3 -0
  243. package/dist/SafeArea/index.js +2 -0
  244. package/dist/Scaffold/demo/base.d.ts +3 -0
  245. package/dist/Scaffold/demo/base.js +30 -0
  246. package/dist/Scaffold/index.d.ts +3 -0
  247. package/dist/Scaffold/index.js +2 -0
  248. package/dist/ScrollView/demo/base.d.ts +3 -0
  249. package/dist/ScrollView/demo/base.js +43 -0
  250. package/dist/ScrollView/index.d.ts +3 -0
  251. package/dist/ScrollView/index.js +2 -0
  252. package/dist/SideBar/SideBarContext.d.ts +18 -0
  253. package/dist/SideBar/SideBarContext.js +2 -0
  254. package/dist/SideBar/demo/base.d.ts +3 -0
  255. package/dist/SideBar/demo/base.js +54 -0
  256. package/dist/SideBar/demo/default-active.d.ts +3 -0
  257. package/dist/SideBar/demo/default-active.js +34 -0
  258. package/dist/SideBar/demo/scroll-mode.d.ts +3 -0
  259. package/dist/SideBar/demo/scroll-mode.js +55 -0
  260. package/dist/SideBar/index.d.ts +3 -0
  261. package/dist/SideBar/index.js +2 -0
  262. package/dist/SideBar/side-bar.d.ts +25 -0
  263. package/dist/SideBar/side-bar.js +351 -0
  264. package/dist/SideBar/style.scss +85 -0
  265. package/dist/SideBar/types.d.ts +7 -0
  266. package/dist/SideBar/types.js +1 -0
  267. package/dist/Space/demo/base.d.ts +3 -0
  268. package/dist/Space/demo/base.js +120 -0
  269. package/dist/Space/index.d.ts +3 -0
  270. package/dist/Space/index.js +2 -0
  271. package/dist/SpinLoading/demo/base.d.ts +3 -0
  272. package/dist/SpinLoading/demo/base.js +21 -0
  273. package/dist/SpinLoading/index.d.ts +3 -0
  274. package/dist/SpinLoading/index.js +2 -0
  275. package/dist/Steps/demo/base.d.ts +3 -0
  276. package/dist/Steps/demo/base.js +71 -0
  277. package/dist/Steps/index.d.ts +3 -0
  278. package/dist/Steps/index.js +2 -0
  279. package/dist/Swiper/Swiper.d.ts +10 -0
  280. package/dist/Swiper/Swiper.js +22 -0
  281. package/dist/Swiper/SwiperCore.d.ts +23 -0
  282. package/dist/Swiper/SwiperCore.js +272 -0
  283. package/dist/Swiper/demo/base.d.ts +3 -0
  284. package/dist/Swiper/demo/base.js +122 -0
  285. package/dist/Swiper/index.d.ts +8 -0
  286. package/dist/Swiper/index.js +5 -0
  287. package/dist/Swiper/style.scss +54 -0
  288. package/dist/Switch/demo/base.d.ts +3 -0
  289. package/dist/Switch/demo/base.js +108 -0
  290. package/dist/Switch/index.d.ts +3 -0
  291. package/dist/Switch/index.js +2 -0
  292. package/dist/TabBar/demo/base.d.ts +6 -0
  293. package/dist/TabBar/demo/base.js +26 -0
  294. package/dist/TabBar/index.d.ts +3 -0
  295. package/dist/TabBar/index.js +2 -0
  296. package/dist/Tabs/demo/base.d.ts +3 -0
  297. package/dist/Tabs/demo/base.js +59 -0
  298. package/dist/Tabs/index.d.ts +3 -0
  299. package/dist/Tabs/index.js +2 -0
  300. package/dist/Tag/demo/base.d.ts +7 -0
  301. package/dist/Tag/demo/base.js +67 -0
  302. package/dist/Tag/demo/style.scss +8 -0
  303. package/dist/Tag/index.d.ts +3 -0
  304. package/dist/Tag/index.js +2 -0
  305. package/dist/Toast/demo/base.d.ts +3 -0
  306. package/dist/Toast/demo/base.js +121 -0
  307. package/dist/Toast/demo/component-mode.d.ts +3 -0
  308. package/dist/Toast/demo/component-mode.js +32 -0
  309. package/dist/Toast/index.d.ts +8 -0
  310. package/dist/Toast/index.js +4 -0
  311. package/dist/Toast/style.scss +63 -0
  312. package/dist/Toast/toast-modal.d.ts +18 -0
  313. package/dist/Toast/toast-modal.js +112 -0
  314. package/dist/Toast/toast.d.ts +20 -0
  315. package/dist/Toast/toast.js +112 -0
  316. package/dist/VerificationCodeInput/demo/base.d.ts +3 -0
  317. package/dist/VerificationCodeInput/demo/base.js +11 -0
  318. package/dist/VerificationCodeInput/index.d.ts +3 -0
  319. package/dist/VerificationCodeInput/index.js +2 -0
  320. package/dist/WaterMark/demo/demo1.d.ts +7 -0
  321. package/dist/WaterMark/demo/demo1.js +47 -0
  322. package/dist/WaterMark/demo/demo1.scss +6 -0
  323. package/dist/WaterMark/demo/demo2.d.ts +3 -0
  324. package/dist/WaterMark/demo/demo2.js +31 -0
  325. package/dist/WaterMark/index.d.ts +3 -0
  326. package/dist/WaterMark/index.js +2 -0
  327. package/dist/index.d.ts +106 -0
  328. package/dist/index.js +53 -0
  329. package/dist/locales/base.d.ts +139 -0
  330. package/dist/locales/base.js +139 -0
  331. package/dist/locales/en-US.d.ts +139 -0
  332. package/dist/locales/en-US.js +4 -0
  333. package/dist/locales/zh-CN.d.ts +3 -0
  334. package/dist/locales/zh-CN.js +140 -0
  335. package/dist/types.d.ts +8 -0
  336. package/dist/types.js +1 -0
  337. package/dist/utils/attach-properties-to-component.d.ts +1 -0
  338. package/dist/utils/attach-properties-to-component.js +9 -0
  339. package/dist/utils/bound.d.ts +1 -0
  340. package/dist/utils/bound.js +10 -0
  341. package/dist/utils/can-use-dom.d.ts +1 -0
  342. package/dist/utils/can-use-dom.js +1 -0
  343. package/dist/utils/convert-px.d.ts +1 -0
  344. package/dist/utils/convert-px.js +27 -0
  345. package/dist/utils/datetime-utils.d.ts +3 -0
  346. package/dist/utils/datetime-utils.js +18 -0
  347. package/dist/utils/dev-log.d.ts +3 -0
  348. package/dist/utils/dev-log.js +36 -0
  349. package/dist/utils/get-container.d.ts +2 -0
  350. package/dist/utils/get-container.js +4 -0
  351. package/dist/utils/get-scroll-parent.d.ts +3 -0
  352. package/dist/utils/get-scroll-parent.js +23 -0
  353. package/dist/utils/is-dev.d.ts +1 -0
  354. package/dist/utils/is-dev.js +1 -0
  355. package/dist/utils/lang.d.ts +1 -0
  356. package/dist/utils/lang.js +1 -0
  357. package/dist/utils/matrix.d.ts +10 -0
  358. package/dist/utils/matrix.js +37 -0
  359. package/dist/utils/merge-locale.d.ts +1 -0
  360. package/dist/utils/merge-locale.js +16 -0
  361. package/dist/utils/native-props.d.ts +10 -0
  362. package/dist/utils/native-props.js +39 -0
  363. package/dist/utils/random-utils.d.ts +3 -0
  364. package/dist/utils/random-utils.js +13 -0
  365. package/dist/utils/reactNode.d.ts +7 -0
  366. package/dist/utils/reactNode.js +13 -0
  367. package/dist/utils/render-imperatively.d.ts +14 -0
  368. package/dist/utils/render-imperatively.js +105 -0
  369. package/dist/utils/render-to-body.d.ts +2 -0
  370. package/dist/utils/render-to-body.js +13 -0
  371. package/dist/utils/render-to-container.d.ts +3 -0
  372. package/dist/utils/render-to-container.js +10 -0
  373. package/dist/utils/render.d.ts +9 -0
  374. package/dist/utils/render.js +87 -0
  375. package/dist/utils/rubberband.d.ts +2 -0
  376. package/dist/utils/rubberband.js +11 -0
  377. package/dist/utils/should-render.d.ts +10 -0
  378. package/dist/utils/should-render.js +12 -0
  379. package/dist/utils/supports-passive.d.ts +1 -0
  380. package/dist/utils/supports-passive.js +13 -0
  381. package/dist/utils/to-css-length.d.ts +1 -0
  382. package/dist/utils/to-css-length.js +3 -0
  383. package/dist/utils/type.d.ts +65 -0
  384. package/dist/utils/type.js +48 -0
  385. package/dist/utils/use-initialized.d.ts +1 -0
  386. package/dist/utils/use-initialized.js +8 -0
  387. package/dist/utils/use-isomorphic-update-layout-effect.d.ts +2 -0
  388. package/dist/utils/use-isomorphic-update-layout-effect.js +2 -0
  389. package/dist/utils/use-lock-scroll.d.ts +2 -0
  390. package/dist/utils/use-lock-scroll.js +81 -0
  391. package/dist/utils/use-mutation-effect.d.ts +3 -0
  392. package/dist/utils/use-mutation-effect.js +26 -0
  393. package/dist/utils/use-props-value.d.ts +8 -0
  394. package/dist/utils/use-props-value.js +22 -0
  395. package/dist/utils/use-resize-effect.d.ts +2 -0
  396. package/dist/utils/use-resize-effect.js +23 -0
  397. package/dist/utils/use-touch.d.ts +17 -0
  398. package/dist/utils/use-touch.js +63 -0
  399. package/dist/utils/validate.d.ts +1 -0
  400. package/dist/utils/validate.js +4 -0
  401. package/dist/utils/with-default-props.d.ts +9 -0
  402. package/dist/utils/with-default-props.js +33 -0
  403. package/dist/utils/with-stop-propagation.d.ts +4 -0
  404. package/dist/utils/with-stop-propagation.js +38 -0
  405. package/dist/utils/zIndex.d.ts +1 -0
  406. package/dist/utils/zIndex.js +4 -0
  407. package/dist/utils/zindexContext.d.ts +3 -0
  408. package/dist/utils/zindexContext.js +6 -0
  409. package/package.json +104 -0
  410. package/readme.md +43 -0
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: () => React.JSX.Element;
3
+ export default _default;
@@ -0,0 +1,41 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React from 'react';
8
+ import { DemoBlock } from "../../DemoBlock";
9
+ import { CalendarDatetimePicker } from "../CalendarDatetimePicker";
10
+ import Button from "../../Button";
11
+ import Toast from "../../Toast";
12
+ export default (function () {
13
+ var toastContainer = React.useRef();
14
+ var _React$useState = React.useState(false),
15
+ _React$useState2 = _slicedToArray(_React$useState, 2),
16
+ open = _React$useState2[0],
17
+ setOpen = _React$useState2[1];
18
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
19
+ ref: toastContainer
20
+ }), /*#__PURE__*/React.createElement(DemoBlock, {
21
+ title: "\u65E5\u671F\u65F6\u95F4\u9009\u62E9\u5668"
22
+ }, /*#__PURE__*/React.createElement(CalendarDatetimePicker, {
23
+ open: open,
24
+ afterOpenChange: function afterOpenChange(o) {
25
+ setOpen(o);
26
+ },
27
+ onOk: function onOk(date) {
28
+ Toast.show({
29
+ getContainer: function getContainer() {
30
+ return toastContainer.current;
31
+ },
32
+ content: "".concat(date.getFullYear(), "-").concat(date.getMonth() + 1, "-").concat(date.getDate(), " ").concat(date.getHours(), ":").concat(date.getMinutes())
33
+ });
34
+ }
35
+ }), /*#__PURE__*/React.createElement(Button, {
36
+ block: true,
37
+ onClick: function onClick() {
38
+ setOpen(true);
39
+ }
40
+ }, "\u65E5\u671F\u65F6\u95F4\u9009\u62E9\u5668")));
41
+ });
@@ -0,0 +1,3 @@
1
+ import { CalendarDatetimePicker, CalendarDatetimePickerProps } from "./CalendarDatetimePicker";
2
+ export type { CalendarDatetimePickerProps };
3
+ export default CalendarDatetimePicker;
@@ -0,0 +1,2 @@
1
+ import { CalendarDatetimePicker } from "./CalendarDatetimePicker";
2
+ export default CalendarDatetimePicker;
@@ -0,0 +1,54 @@
1
+ @import "@trionesdev/antd-mobile-base-react/dist/style/variable";
2
+
3
+ $calendarDatetimePickerCls: 'triones-antm-calendar-datetime-picker';
4
+
5
+ .#{$calendarDatetimePickerCls} {
6
+ border-top-left-radius: $trionesBorderRadius;
7
+ border-top-right-radius: $trionesBorderRadius;
8
+
9
+ &-header {
10
+ display: flex;
11
+ justify-content: space-between;
12
+ border-bottom: 1Px solid $trionesBorderColor;
13
+
14
+
15
+ &-display {
16
+ display: flex;
17
+ padding-left: 8Px;
18
+
19
+ &-date {
20
+ padding-inline: 8Px;
21
+ cursor: default;
22
+ display: flex;
23
+ align-items: center;
24
+ }
25
+
26
+ &-time {
27
+ padding-inline: 12Px;
28
+ display: flex;
29
+ align-items: center;
30
+ cursor: default;
31
+ }
32
+
33
+ &-active {
34
+ color: $trionesColorText;
35
+ font-weight: bold;
36
+ background-color: $trionesColorBgTextActive;
37
+ }
38
+ }
39
+
40
+ &-button {
41
+ padding: 12Px 16Px;
42
+
43
+ &-cancel {
44
+ }
45
+
46
+ &-ok {
47
+ color: $trionesColorPrimary;
48
+ }
49
+ }
50
+ }
51
+ &-body {
52
+
53
+ }
54
+ }
@@ -0,0 +1,5 @@
1
+ export declare const cls = "triones-antm-calendar-datetime-picker";
2
+ export declare enum Mode {
3
+ date = 0,
4
+ time = 1
5
+ }
@@ -0,0 +1,6 @@
1
+ export var cls = 'triones-antm-calendar-datetime-picker';
2
+ export var Mode = /*#__PURE__*/function (Mode) {
3
+ Mode[Mode["date"] = 0] = "date";
4
+ Mode[Mode["time"] = 1] = "time";
5
+ return Mode;
6
+ }({});
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import './style.scss';
3
+ import { CalendarPickerProps } from './types';
4
+ export declare const CalendarPicker: FC<CalendarPickerProps>;
@@ -0,0 +1,87 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import classNames from 'classnames';
8
+ import React, { memo, useEffect, useRef } from 'react';
9
+ import Calendar from "../Calendar";
10
+ import "./style.scss";
11
+ import ConfigProvider from "../ConfigProvider";
12
+ import Popup from "../Popup";
13
+ var cls = 'triones-antm-calendar-picker';
14
+ export var CalendarPicker = /*#__PURE__*/memo(function (_ref) {
15
+ var mouth = _ref.mouth,
16
+ open = _ref.open,
17
+ title = _ref.title,
18
+ afterOpenChange = _ref.afterOpenChange,
19
+ value = _ref.value,
20
+ onOk = _ref.onOk,
21
+ onCancel = _ref.onCancel,
22
+ onClose = _ref.onClose;
23
+ var _ConfigProvider$useCo = ConfigProvider.useConfig(),
24
+ locale = _ConfigProvider$useCo.locale;
25
+ var _React$useState = React.useState(open || false),
26
+ _React$useState2 = _slicedToArray(_React$useState, 2),
27
+ innerOpen = _React$useState2[0],
28
+ setInnerOpen = _React$useState2[1];
29
+ var valueRef = useRef();
30
+ var handleClose = function handleClose() {
31
+ setInnerOpen(false);
32
+ onClose === null || onClose === void 0 || onClose();
33
+ };
34
+ var handleOk = function handleOk() {
35
+ onOk === null || onOk === void 0 || onOk(valueRef.current);
36
+ handleClose();
37
+ };
38
+ var handelCancel = function handelCancel() {
39
+ onCancel === null || onCancel === void 0 || onCancel();
40
+ handleClose();
41
+ };
42
+ useEffect(function () {
43
+ afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(innerOpen);
44
+ }, [innerOpen]);
45
+ useEffect(function () {
46
+ if (value !== undefined) {
47
+ if (value !== valueRef.current) {
48
+ valueRef.current = value;
49
+ }
50
+ }
51
+ }, [value]);
52
+ useEffect(function () {
53
+ if (open === undefined) {
54
+ return;
55
+ }
56
+ if (open === innerOpen) {
57
+ return;
58
+ }
59
+ setInnerOpen(open);
60
+ }, [open]);
61
+ return /*#__PURE__*/React.createElement(Popup, {
62
+ open: innerOpen,
63
+ onClose: function onClose() {
64
+ setInnerOpen(false);
65
+ }
66
+ }, /*#__PURE__*/React.createElement("div", {
67
+ className: classNames("".concat(cls))
68
+ }, /*#__PURE__*/React.createElement("div", {
69
+ className: classNames("".concat(cls, "-header"))
70
+ }, /*#__PURE__*/React.createElement("a", {
71
+ className: classNames("".concat(cls, "-header-button"), "".concat(cls, "-header-cancel")),
72
+ onClick: handelCancel
73
+ }, locale.common.cancel), title && /*#__PURE__*/React.createElement("div", {
74
+ className: classNames("".concat(cls, "-header-title"))
75
+ }, title), /*#__PURE__*/React.createElement("a", {
76
+ className: classNames("".concat(cls, "-header-button"), "".concat(cls, "-header-button-ok")),
77
+ onClick: handleOk
78
+ }, locale.common.confirm)), /*#__PURE__*/React.createElement("div", {
79
+ className: classNames("".concat(cls, "-body"))
80
+ }, /*#__PURE__*/React.createElement(Calendar, {
81
+ mouth: mouth,
82
+ value: value,
83
+ onChange: function onChange(date) {
84
+ valueRef.current = date;
85
+ }
86
+ }))));
87
+ });
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import "./style.scss";
3
+ import { CalendarPickerRangeProps } from "./types";
4
+ export declare const CalendarRangePicker: FC<CalendarPickerRangeProps>;
@@ -0,0 +1,87 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { memo, useEffect, useRef } from "react";
8
+ import Popup from "../Popup";
9
+ import classNames from "classnames";
10
+ import Calendar from "../Calendar";
11
+ import "./style.scss";
12
+ import ConfigProvider from "../ConfigProvider";
13
+ var cls = 'triones-antm-calendar-picker';
14
+ export var CalendarRangePicker = /*#__PURE__*/memo(function (_ref) {
15
+ var mouth = _ref.mouth,
16
+ open = _ref.open,
17
+ title = _ref.title,
18
+ afterOpenChange = _ref.afterOpenChange,
19
+ value = _ref.value,
20
+ onOk = _ref.onOk,
21
+ onCancel = _ref.onCancel,
22
+ onClose = _ref.onClose;
23
+ var _ConfigProvider$useCo = ConfigProvider.useConfig(),
24
+ locale = _ConfigProvider$useCo.locale;
25
+ var _React$useState = React.useState(open || false),
26
+ _React$useState2 = _slicedToArray(_React$useState, 2),
27
+ innerOpen = _React$useState2[0],
28
+ setInnerOpen = _React$useState2[1];
29
+ var valueRef = useRef();
30
+ var handleClose = function handleClose() {
31
+ setInnerOpen(false);
32
+ onClose === null || onClose === void 0 || onClose();
33
+ };
34
+ var handleOk = function handleOk() {
35
+ onOk === null || onOk === void 0 || onOk(valueRef.current);
36
+ handleClose();
37
+ };
38
+ var handelCancel = function handelCancel() {
39
+ onCancel === null || onCancel === void 0 || onCancel();
40
+ handleClose();
41
+ };
42
+ useEffect(function () {
43
+ afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(innerOpen);
44
+ }, [innerOpen]);
45
+ useEffect(function () {
46
+ if (value !== undefined) {
47
+ if (value !== valueRef.current) {
48
+ valueRef.current = value;
49
+ }
50
+ }
51
+ }, [value]);
52
+ useEffect(function () {
53
+ if (open === undefined) {
54
+ return;
55
+ }
56
+ if (open === innerOpen) {
57
+ return;
58
+ }
59
+ setInnerOpen(open);
60
+ }, [open]);
61
+ return /*#__PURE__*/React.createElement(Popup, {
62
+ open: innerOpen,
63
+ onClose: function onClose() {
64
+ setInnerOpen(false);
65
+ }
66
+ }, /*#__PURE__*/React.createElement("div", {
67
+ className: classNames("".concat(cls))
68
+ }, /*#__PURE__*/React.createElement("div", {
69
+ className: classNames("".concat(cls, "-header"))
70
+ }, /*#__PURE__*/React.createElement("a", {
71
+ className: classNames("".concat(cls, "-header-button")),
72
+ onClick: handelCancel
73
+ }, locale.common.cancel), title && /*#__PURE__*/React.createElement("div", {
74
+ className: classNames("".concat(cls, "-header-title"))
75
+ }, title), /*#__PURE__*/React.createElement("a", {
76
+ className: classNames("".concat(cls, "-header-button")),
77
+ onClick: handleOk
78
+ }, locale.common.confirm)), /*#__PURE__*/React.createElement("div", {
79
+ className: classNames("".concat(cls, "-body"))
80
+ }, /*#__PURE__*/React.createElement(Calendar.Range, {
81
+ mouth: mouth,
82
+ value: value,
83
+ onChange: function onChange(date) {
84
+ valueRef.current = date;
85
+ }
86
+ }))));
87
+ });
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: () => React.JSX.Element;
3
+ export default _default;
@@ -0,0 +1,66 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React from 'react';
8
+ import { DemoBlock } from "../../DemoBlock";
9
+ import Button from "../../Button";
10
+ import CalendarPicker from "../index";
11
+ import Toast from "../../Toast";
12
+ export default (function () {
13
+ var toastContainer = React.useRef();
14
+ var _React$useState = React.useState(false),
15
+ _React$useState2 = _slicedToArray(_React$useState, 2),
16
+ open = _React$useState2[0],
17
+ setOpen = _React$useState2[1];
18
+ var _React$useState3 = React.useState(false),
19
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
20
+ open2 = _React$useState4[0],
21
+ setOpen2 = _React$useState4[1];
22
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
23
+ ref: toastContainer
24
+ }), /*#__PURE__*/React.createElement(DemoBlock, {
25
+ title: "\u65E5\u671F\u9009\u62E9\u5668"
26
+ }, /*#__PURE__*/React.createElement(CalendarPicker, {
27
+ open: open,
28
+ afterOpenChange: function afterOpenChange(o) {
29
+ setOpen(o);
30
+ },
31
+ onOk: function onOk(date) {
32
+ Toast.show({
33
+ getContainer: function getContainer() {
34
+ return toastContainer.current;
35
+ },
36
+ content: "".concat(date.getFullYear(), "-").concat(date.getMonth() + 1, "-").concat(date.getDate())
37
+ });
38
+ }
39
+ }), /*#__PURE__*/React.createElement(Button, {
40
+ block: true,
41
+ onClick: function onClick() {
42
+ setOpen(true);
43
+ }
44
+ }, "\u65E5\u5386\u9009\u62E9\u5668")), /*#__PURE__*/React.createElement(DemoBlock, {
45
+ title: "\u65E5\u5386\u9009\u62E9\u5668(\u533A\u95F4)"
46
+ }, /*#__PURE__*/React.createElement(CalendarPicker.Range, {
47
+ open: open2,
48
+ afterOpenChange: function afterOpenChange(o) {
49
+ setOpen2(o);
50
+ },
51
+ onOk: function onOk(date) {
52
+ var _$getMonth, _$getMonth2;
53
+ Toast.show({
54
+ getContainer: function getContainer() {
55
+ return toastContainer.current;
56
+ },
57
+ content: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, "".concat(date[0].getFullYear(), "-").concat((_$getMonth = date[0].getMonth()) !== null && _$getMonth !== void 0 ? _$getMonth : +1, "-").concat(date[0].getDate())), /*#__PURE__*/React.createElement("div", null, "".concat(date[1].getFullYear(), "-").concat((_$getMonth2 = date[1].getMonth()) !== null && _$getMonth2 !== void 0 ? _$getMonth2 : +1, "-").concat(date[1].getDate())))
58
+ });
59
+ }
60
+ }), /*#__PURE__*/React.createElement(Button, {
61
+ block: true,
62
+ onClick: function onClick() {
63
+ setOpen2(true);
64
+ }
65
+ }, "\u65E5\u5386\u9009\u62E9\u5668(\u533A\u95F4)")));
66
+ });
@@ -0,0 +1,9 @@
1
+ import { CalendarPicker as InternalCalendarPicker } from "./calendar-picker";
2
+ import { CalendarRangePicker } from "./calendar-range-picker";
3
+ import { CalendarPickerProps } from "./types";
4
+ type CompoundedComponent = typeof InternalCalendarPicker & {
5
+ Range: typeof CalendarRangePicker;
6
+ };
7
+ declare const CalendarPicker: CompoundedComponent;
8
+ export type { CalendarPickerProps };
9
+ export default CalendarPicker;
@@ -0,0 +1,5 @@
1
+ import { CalendarPicker as InternalCalendarPicker } from "./calendar-picker";
2
+ import { CalendarRangePicker } from "./calendar-range-picker";
3
+ var CalendarPicker = InternalCalendarPicker;
4
+ CalendarPicker.Range = CalendarRangePicker;
5
+ export default CalendarPicker;
@@ -0,0 +1,31 @@
1
+ @import "@trionesdev/antd-mobile-base-react/dist/style/variable";
2
+
3
+ $calendarPickerCls: 'triones-antm-calendar-picker';
4
+
5
+ .#{$calendarPickerCls} {
6
+ border-top-left-radius: $trionesBorderRadius;
7
+ border-top-right-radius: $trionesBorderRadius;
8
+
9
+ &-header {
10
+ display: flex;
11
+ justify-content: space-between;
12
+ border-bottom: 1Px solid $trionesBorderColor;
13
+ padding: 4Px;
14
+ &-button {
15
+ padding: 8Px 12Px;
16
+
17
+ &-cancel {
18
+ }
19
+
20
+ &-ok {
21
+ color: $trionesColorPrimary;
22
+ }
23
+ }
24
+
25
+
26
+ }
27
+
28
+ &-body {
29
+ pointer-events: unset;
30
+ }
31
+ }
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ export type CalendarPickerProps = {
3
+ mouth?: Date;
4
+ open?: boolean;
5
+ title?: React.ReactNode;
6
+ afterOpenChange?: (open: boolean) => void;
7
+ value?: Date;
8
+ onOk?: (value?: Date) => void;
9
+ onCancel?: () => void;
10
+ onClose?: () => void;
11
+ };
12
+ export type CalendarPickerRangeProps = {
13
+ mouth?: Date;
14
+ open?: boolean;
15
+ title?: React.ReactNode;
16
+ afterOpenChange?: (open: boolean) => void;
17
+ value?: Date[];
18
+ onOk?: (value?: Date[]) => void;
19
+ onCancel?: () => void;
20
+ onClose?: () => void;
21
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './base.scss';
3
+ declare const _default: () => React.JSX.Element;
4
+ export default _default;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * compact: true
3
+ */
4
+ import classNames from 'classnames';
5
+ import React from 'react';
6
+ import { DemoBlock } from "../../DemoBlock";
7
+ import { Card } from "../..";
8
+ import "./base.scss";
9
+ var classPrefix = "card-demo";
10
+ export default (function () {
11
+ var onClick = function onClick() {
12
+ console.log('点击了卡片');
13
+ };
14
+ var onHeaderClick = function onHeaderClick() {
15
+ console.log('点击了卡片Header区域');
16
+ };
17
+ var onBodyClick = function onBodyClick() {
18
+ console.log('点击了卡片Body区域');
19
+ };
20
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
21
+ title: "\u57FA\u7840\u7528\u6CD5"
22
+ }, /*#__PURE__*/React.createElement(Card, {
23
+ title: "\u5361\u7247\u6807\u9898",
24
+ onClick: onClick
25
+ }, "\u5361\u7247\u5185\u5BB9")), /*#__PURE__*/React.createElement(DemoBlock, {
26
+ title: "\u6CA1\u6709\u5361\u7247\u5185\u5BB9"
27
+ }, /*#__PURE__*/React.createElement(Card, {
28
+ title: "\u5361\u7247\u6807\u9898",
29
+ onClick: onClick
30
+ })), /*#__PURE__*/React.createElement(DemoBlock, {
31
+ title: "\u6CA1\u6709\u5361\u7247\u6807\u9898"
32
+ }, /*#__PURE__*/React.createElement(Card, {
33
+ onClick: onClick
34
+ }, "\u5361\u7247\u5185\u5BB9")), /*#__PURE__*/React.createElement(DemoBlock, {
35
+ title: "\u81EA\u5B9A\u4E49\u5361\u7247\u5185\u5BB9"
36
+ }, /*#__PURE__*/React.createElement(Card, {
37
+ title: /*#__PURE__*/React.createElement("div", {
38
+ style: {
39
+ fontWeight: 'normal'
40
+ }
41
+ }, "\u5361\u7247\u6807\u9898"),
42
+ onBodyClick: onBodyClick,
43
+ onHeaderClick: onHeaderClick,
44
+ style: {
45
+ borderRadius: '16px'
46
+ }
47
+ }, /*#__PURE__*/React.createElement("div", {
48
+ className: classNames("".concat(classPrefix, "-content"))
49
+ }, "\u5361\u7247\u5185\u5BB9"), /*#__PURE__*/React.createElement("div", {
50
+ className: classNames("".concat(classPrefix, "-footer")),
51
+ onClick: function onClick(e) {
52
+ return e.stopPropagation();
53
+ }
54
+ }))), /*#__PURE__*/React.createElement(DemoBlock, {
55
+ title: "\u81EA\u5B9A\u4E49\u5361\u7247\u6837\u5F0F"
56
+ }, /*#__PURE__*/React.createElement(Card, {
57
+ styles: {
58
+ header: {
59
+ color: '#1677ff'
60
+ }
61
+ },
62
+ bodyClassName: classNames("".concat(classPrefix, "-customBody")),
63
+ title: "\u5361\u7247\u6807\u9898"
64
+ }, "\u5361\u7247\u5185\u5BB9")));
65
+ });
@@ -0,0 +1,18 @@
1
+ $class-prefix-card: 'card-demo';
2
+
3
+ .#{$class-prefix-card} {
4
+ &-content {
5
+ height: 50px;
6
+ }
7
+ &-footer {
8
+ padding-top: 11px;
9
+ border-top: 1px solid #e5e5e5;
10
+ display: flex;
11
+ justify-content: flex-end;
12
+ }
13
+
14
+ &-customBody {
15
+ color: green;
16
+ }
17
+
18
+ }
@@ -0,0 +1,3 @@
1
+ import { Card } from '@trionesdev/antd-mobile-base-react';
2
+ export type { CardProps } from '@trionesdev/antd-mobile-base-react';
3
+ export default Card;
@@ -0,0 +1,2 @@
1
+ import { Card } from '@trionesdev/antd-mobile-base-react';
2
+ export default Card;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const _default: () => React.JSX.Element;
3
+ export default _default;
@@ -0,0 +1,85 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React from "react";
8
+ import { DemoBlock } from "../../DemoBlock";
9
+ import Button from "../../Button";
10
+ import CascaderPicker from "../index";
11
+ export default (function () {
12
+ var _React$useState = React.useState(false),
13
+ _React$useState2 = _slicedToArray(_React$useState, 2),
14
+ open = _React$useState2[0],
15
+ setOpen = _React$useState2[1];
16
+ var options = [{
17
+ value: "jiangsu",
18
+ label: "江苏",
19
+ children: [{
20
+ value: "nanjing",
21
+ label: '南京'
22
+ }, {
23
+ value: "wuxi",
24
+ label: '无锡'
25
+ }, {
26
+ value: "changzhou",
27
+ label: '常州'
28
+ }, {
29
+ value: "suzhou",
30
+ label: '苏州',
31
+ children: [{
32
+ value: "gushu",
33
+ label: '姑苏区'
34
+ }]
35
+ }]
36
+ }, {
37
+ value: "zhejiang",
38
+ label: "浙江",
39
+ children: [{
40
+ value: "hangzhou",
41
+ label: '杭州'
42
+ }, {
43
+ value: "wenzhou",
44
+ label: '温州'
45
+ }]
46
+ }, {
47
+ value: "shanghai",
48
+ label: "上海"
49
+ }, {
50
+ value: "shandong",
51
+ label: '山东'
52
+ }, {
53
+ value: "henan",
54
+ label: '河南'
55
+ }, {
56
+ value: "hebei",
57
+ label: '河北'
58
+ }, {
59
+ value: "hunan",
60
+ label: '湖南'
61
+ }, {
62
+ value: "hubei",
63
+ label: '湖北'
64
+ }];
65
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
66
+ title: "\u57FA\u672C\u4F7F\u7528"
67
+ }, /*#__PURE__*/React.createElement(CascaderPicker, {
68
+ open: open,
69
+ options: options,
70
+ onOk: function onOk(value) {
71
+ console.log(value);
72
+ },
73
+ style: {
74
+ height: 300
75
+ },
76
+ onClose: function onClose() {
77
+ setOpen(false);
78
+ }
79
+ }), /*#__PURE__*/React.createElement(Button, {
80
+ block: true,
81
+ onClick: function onClick() {
82
+ setOpen(true);
83
+ }
84
+ }, "\u7EA7\u8054\u9009\u62E9")));
85
+ });
@@ -0,0 +1,3 @@
1
+ import { CascaderPicker, CascaderPickerProps } from "@trionesdev/antd-mobile-base-react";
2
+ export type { CascaderPickerProps };
3
+ export default CascaderPicker;