@trionesdev/antd-taro-react 0.0.1-beta.3 → 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 (581) hide show
  1. package/dist/ActionSheet/index.d.ts +3 -0
  2. package/dist/ActionSheet/index.js +2 -0
  3. package/dist/Alert/index.d.ts +1 -1
  4. package/dist/Alert/index.js +1 -1
  5. package/dist/Avatar/index.d.ts +2 -1
  6. package/dist/Avatar/index.js +1 -1
  7. package/dist/Badge/index.d.ts +2 -2
  8. package/dist/Badge/index.js +1 -1
  9. package/dist/Button/button.d.ts +10 -6
  10. package/dist/Button/button.js +17 -9
  11. package/dist/Button/style.scss +231 -193
  12. package/dist/Calendar/calendar-grid.js +2 -2
  13. package/dist/Calendar/calendar-header.js +3 -3
  14. package/dist/Calendar/calendar-range.d.ts +3 -2
  15. package/dist/Calendar/calendar-range.js +17 -7
  16. package/dist/Calendar/calendar.d.ts +5 -3
  17. package/dist/Calendar/calendar.js +22 -8
  18. package/dist/Calendar/index.d.ts +4 -4
  19. package/dist/Calendar/style.scss +85 -85
  20. package/dist/Calendar/touchable-calendar-grid.js +49 -41
  21. package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +10 -0
  22. package/dist/{Switch/switch.js → CalendarDatetimePicker/CalendarDatetimePicker.js} +154 -93
  23. package/dist/CalendarDatetimePicker/DateTimeSwitch.d.ts +14 -0
  24. package/dist/{Checkbox/checkbox-button.js → CalendarDatetimePicker/DateTimeSwitch.js} +26 -29
  25. package/dist/CalendarDatetimePicker/index.d.ts +3 -0
  26. package/dist/CalendarDatetimePicker/index.js +2 -0
  27. package/dist/CalendarDatetimePicker/style.scss +54 -0
  28. package/dist/CalendarDatetimePicker/types.d.ts +5 -0
  29. package/dist/CalendarDatetimePicker/types.js +6 -0
  30. package/dist/CalendarPicker/calendar-picker.d.ts +3 -3
  31. package/dist/CalendarPicker/calendar-picker.js +13 -12
  32. package/dist/CalendarPicker/calendar-range-picker.js +8 -7
  33. package/dist/CalendarPicker/style.scss +31 -20
  34. package/dist/Card/index.d.ts +2 -3
  35. package/dist/Card/index.js +1 -2
  36. package/dist/CascaderPicker/index.d.ts +1 -1
  37. package/dist/CascaderPicker/index.js +1 -1
  38. package/dist/CascaderView/index.d.ts +1 -1
  39. package/dist/CascaderView/index.js +1 -1
  40. package/dist/Cell/index.d.ts +3 -0
  41. package/dist/Cell/index.js +2 -0
  42. package/dist/Checkbox/index.d.ts +2 -8
  43. package/dist/Checkbox/index.js +1 -10
  44. package/dist/ConfigProvider/index.d.ts +2 -3
  45. package/dist/ConfigProvider/index.js +1 -2
  46. package/dist/Descriptions/index.d.ts +3 -0
  47. package/dist/Descriptions/index.js +2 -0
  48. package/dist/Divider/index.d.ts +2 -1
  49. package/dist/Divider/index.js +1 -1
  50. package/dist/Ellipsis/index.d.ts +2 -2
  51. package/dist/Ellipsis/index.js +1 -1
  52. package/dist/Empty/index.d.ts +2 -11
  53. package/dist/Empty/index.js +1 -48
  54. package/dist/ErrorBlock/index.d.ts +2 -6
  55. package/dist/ErrorBlock/index.js +1 -2
  56. package/dist/Footer/index.d.ts +2 -2
  57. package/dist/Footer/index.js +1 -1
  58. package/dist/Form/index.d.ts +1 -10
  59. package/dist/Form/index.js +1 -7
  60. package/dist/Grid/index.d.ts +2 -6
  61. package/dist/Grid/index.js +1 -3
  62. package/dist/Image/image.d.ts +9 -0
  63. package/dist/{Card/native-props.js → Image/image.js} +15 -19
  64. package/dist/Image/index.d.ts +3 -0
  65. package/dist/Image/index.js +2 -0
  66. package/dist/ImagesPreview/ImagesPreview.d.ts +12 -0
  67. package/dist/ImagesPreview/ImagesPreview.js +84 -0
  68. package/dist/ImagesPreview/index.d.ts +3 -0
  69. package/dist/ImagesPreview/index.js +2 -0
  70. package/dist/ImagesPreview/style.scss +34 -0
  71. package/dist/ImagesWall/ImagesWall.d.ts +29 -0
  72. package/dist/ImagesWall/ImagesWall.js +139 -0
  73. package/dist/ImagesWall/index.d.ts +3 -0
  74. package/dist/ImagesWall/index.js +2 -0
  75. package/dist/ImagesWall/style.scss +70 -0
  76. package/dist/Input/index.d.ts +2 -9
  77. package/dist/Input/index.js +1 -6
  78. package/dist/InputNumber/index.d.ts +1 -1
  79. package/dist/InputNumber/index.js +1 -1
  80. package/dist/Mask/index.d.ts +2 -1
  81. package/dist/Mask/index.js +1 -1
  82. package/dist/NavBar/index.d.ts +2 -2
  83. package/dist/NavBar/index.js +1 -1
  84. package/dist/NoticeBar/index.d.ts +2 -2
  85. package/dist/NoticeBar/index.js +1 -1
  86. package/dist/PageIndicator/index.d.ts +2 -2
  87. package/dist/PageIndicator/index.js +1 -1
  88. package/dist/Picker/index.d.ts +1 -1
  89. package/dist/Picker/index.js +1 -1
  90. package/dist/PickerView/index.d.ts +2 -3
  91. package/dist/PickerView/index.js +1 -1
  92. package/dist/Popup/index.d.ts +1 -1
  93. package/dist/Popup/index.js +1 -1
  94. package/dist/Progress/Progress.d.ts +38 -0
  95. package/dist/Progress/Progress.js +53 -0
  96. package/dist/Progress/ProgressCircle.d.ts +16 -0
  97. package/dist/Progress/ProgressCircle.js +147 -0
  98. package/dist/Progress/ProgressLine.d.ts +15 -0
  99. package/dist/Progress/ProgressLine.js +87 -0
  100. package/dist/Progress/index.d.ts +3 -0
  101. package/dist/Progress/index.js +2 -0
  102. package/dist/Progress/style.scss +33 -0
  103. package/dist/Progress/types.d.ts +4 -0
  104. package/dist/Progress/types.js +2 -0
  105. package/dist/Radio/index.d.ts +2 -10
  106. package/dist/Radio/index.js +1 -13
  107. package/dist/Rate/index.d.ts +2 -1
  108. package/dist/Rate/index.js +1 -1
  109. package/dist/Result/index.d.ts +2 -2
  110. package/dist/Result/index.js +1 -1
  111. package/dist/SafeArea/index.d.ts +2 -3
  112. package/dist/SafeArea/index.js +1 -2
  113. package/dist/Scaffold/index.d.ts +1 -1
  114. package/dist/Scaffold/index.js +1 -1
  115. package/dist/ScrollView/index.d.ts +1 -1
  116. package/dist/ScrollView/index.js +1 -1
  117. package/dist/SideBar/SideBarContext.d.ts +3 -3
  118. package/dist/SideBar/index.d.ts +1 -1
  119. package/dist/SideBar/side-bar.js +183 -95
  120. package/dist/SideBar/style.scss +85 -86
  121. package/dist/Space/index.d.ts +2 -2
  122. package/dist/Space/index.js +1 -1
  123. package/dist/SpinLoading/index.d.ts +2 -1
  124. package/dist/SpinLoading/index.js +1 -1
  125. package/dist/Steps/index.d.ts +3 -0
  126. package/dist/Steps/index.js +2 -0
  127. package/dist/Swiper/index.d.ts +8 -0
  128. package/dist/Swiper/index.js +5 -0
  129. package/dist/Swiper/swiper.d.ts +11 -0
  130. package/dist/{Avatar/avatar.js → Swiper/swiper.js} +19 -34
  131. package/dist/Switch/index.d.ts +2 -2
  132. package/dist/Switch/index.js +1 -1
  133. package/dist/TabBar/index.d.ts +2 -5
  134. package/dist/TabBar/index.js +1 -2
  135. package/dist/Tabs/index.d.ts +1 -7
  136. package/dist/Tabs/index.js +1 -4
  137. package/dist/Tag/index.d.ts +1 -1
  138. package/dist/Tag/index.js +1 -1
  139. package/dist/Toast/index.d.ts +1 -6
  140. package/dist/Toast/index.js +1 -3
  141. package/dist/VerificationCodeInput/index.d.ts +2 -1
  142. package/dist/VerificationCodeInput/index.js +1 -1
  143. package/dist/WaterMark/index.d.ts +2 -2
  144. package/dist/WaterMark/index.js +1 -1
  145. package/dist/hooks/index.d.ts +1 -0
  146. package/dist/hooks/index.js +1 -0
  147. package/dist/hooks/useTaro.d.ts +7 -0
  148. package/dist/hooks/useTaro.js +21 -0
  149. package/dist/index.d.ts +55 -11
  150. package/dist/index.js +15 -7
  151. package/dist/types.d.ts +9 -0
  152. package/dist/utils/datetime-utils.d.ts +3 -0
  153. package/dist/utils/datetime-utils.js +18 -0
  154. package/dist/utils/random-utils.d.ts +3 -0
  155. package/dist/utils/random-utils.js +13 -0
  156. package/package.json +36 -72
  157. package/readme.md +23 -43
  158. package/dist/Alert/alert.d.ts +0 -32
  159. package/dist/Alert/alert.js +0 -49
  160. package/dist/Alert/demo/base.d.ts +0 -3
  161. package/dist/Alert/demo/base.js +0 -56
  162. package/dist/Alert/style.scss +0 -69
  163. package/dist/Avatar/avatar.d.ts +0 -14
  164. package/dist/Avatar/demo/base.d.ts +0 -7
  165. package/dist/Avatar/demo/base.js +0 -109
  166. package/dist/Avatar/demo/style.scss +0 -6
  167. package/dist/Avatar/style.scss +0 -16
  168. package/dist/Badge/badge.d.ts +0 -14
  169. package/dist/Badge/badge.js +0 -82
  170. package/dist/Badge/demo/base.d.ts +0 -7
  171. package/dist/Badge/demo/base.js +0 -167
  172. package/dist/Badge/demo/base.scss +0 -6
  173. package/dist/Badge/style.scss +0 -100
  174. package/dist/Button/demo/base.d.ts +0 -3
  175. package/dist/Button/demo/base.js +0 -163
  176. package/dist/Calendar/demo/calendar.d.ts +0 -3
  177. package/dist/Calendar/demo/calendar.js +0 -10
  178. package/dist/Calendar/demo/grid.d.ts +0 -3
  179. package/dist/Calendar/demo/grid.js +0 -12
  180. package/dist/Calendar/demo/touch-grid.d.ts +0 -3
  181. package/dist/Calendar/demo/touch-grid.js +0 -8
  182. package/dist/CalendarPicker/demo/base.d.ts +0 -3
  183. package/dist/CalendarPicker/demo/base.js +0 -65
  184. package/dist/Card/card.d.ts +0 -17
  185. package/dist/Card/card.js +0 -36
  186. package/dist/Card/demo/base.d.ts +0 -4
  187. package/dist/Card/demo/base.js +0 -63
  188. package/dist/Card/demo/base.scss +0 -18
  189. package/dist/Card/native-props.d.ts +0 -8
  190. package/dist/Card/style.scss +0 -31
  191. package/dist/CascaderPicker/cascader-picker.d.ts +0 -20
  192. package/dist/CascaderPicker/cascader-picker.js +0 -106
  193. package/dist/CascaderPicker/demo/base.d.ts +0 -3
  194. package/dist/CascaderPicker/demo/base.js +0 -85
  195. package/dist/CascaderPicker/style.scss +0 -39
  196. package/dist/CascaderView/cascader-column-item.d.ts +0 -8
  197. package/dist/CascaderView/cascader-column-item.js +0 -19
  198. package/dist/CascaderView/cascader-column.d.ts +0 -9
  199. package/dist/CascaderView/cascader-column.js +0 -26
  200. package/dist/CascaderView/cascader-view.d.ts +0 -12
  201. package/dist/CascaderView/cascader-view.js +0 -120
  202. package/dist/CascaderView/demo/async.d.ts +0 -3
  203. package/dist/CascaderView/demo/async.js +0 -41
  204. package/dist/CascaderView/demo/base.d.ts +0 -3
  205. package/dist/CascaderView/demo/base.js +0 -62
  206. package/dist/CascaderView/demo/value.d.ts +0 -3
  207. package/dist/CascaderView/demo/value.js +0 -63
  208. package/dist/CascaderView/style.scss +0 -20
  209. package/dist/CascaderView/types.d.ts +0 -10
  210. package/dist/Checkbox/checkbox-button.d.ts +0 -3
  211. package/dist/Checkbox/checkbox-group.d.ts +0 -3
  212. package/dist/Checkbox/checkbox-group.js +0 -32
  213. package/dist/Checkbox/checkbox.d.ts +0 -4
  214. package/dist/Checkbox/checkbox.js +0 -43
  215. package/dist/Checkbox/demo/base.d.ts +0 -6
  216. package/dist/Checkbox/demo/base.js +0 -42
  217. package/dist/Checkbox/demo/disabled.d.ts +0 -3
  218. package/dist/Checkbox/demo/disabled.js +0 -19
  219. package/dist/Checkbox/group-context.d.ts +0 -3
  220. package/dist/Checkbox/group-context.js +0 -2
  221. package/dist/Checkbox/index.scss +0 -151
  222. package/dist/Checkbox/types.d.ts +0 -19
  223. package/dist/Checkbox/types.js +0 -1
  224. package/dist/ConfigProvider/config-provider.d.ts +0 -57
  225. package/dist/ConfigProvider/config-provider.js +0 -41
  226. package/dist/ConfigProvider/demo/base.d.ts +0 -6
  227. package/dist/ConfigProvider/demo/base.js +0 -24
  228. package/dist/DemoBlock/index.d.ts +0 -10
  229. package/dist/DemoBlock/index.js +0 -15
  230. package/dist/DemoBlock/index.scss +0 -20
  231. package/dist/DemoDescription/index.d.ts +0 -6
  232. package/dist/DemoDescription/index.js +0 -7
  233. package/dist/DemoDescription/index.scss +0 -3
  234. package/dist/Divider/demo/base.d.ts +0 -3
  235. package/dist/Divider/demo/base.js +0 -35
  236. package/dist/Divider/divider.d.ts +0 -17
  237. package/dist/Divider/divider.js +0 -36
  238. package/dist/Divider/style.scss +0 -62
  239. package/dist/Ellipsis/demo/base.d.ts +0 -3
  240. package/dist/Ellipsis/demo/base.js +0 -81
  241. package/dist/Ellipsis/ellipsis.d.ts +0 -16
  242. package/dist/Ellipsis/ellipsis.js +0 -79
  243. package/dist/Ellipsis/style.scss +0 -13
  244. package/dist/Ellipsis/useMeasure.d.ts +0 -2
  245. package/dist/Ellipsis/useMeasure.js +0 -123
  246. package/dist/Empty/demo/base.d.ts +0 -3
  247. package/dist/Empty/demo/base.js +0 -38
  248. package/dist/Empty/empty.d.ts +0 -3
  249. package/dist/Empty/empty.js +0 -48
  250. package/dist/Empty/style.scss +0 -22
  251. package/dist/ErrorBlock/create-error-block.d.ts +0 -13
  252. package/dist/ErrorBlock/create-error-block.js +0 -45
  253. package/dist/ErrorBlock/demo/base.d.ts +0 -3
  254. package/dist/ErrorBlock/demo/base.js +0 -23
  255. package/dist/ErrorBlock/error-block.d.ts +0 -2
  256. package/dist/ErrorBlock/error-block.js +0 -9
  257. package/dist/ErrorBlock/images/busy.d.ts +0 -2
  258. package/dist/ErrorBlock/images/busy.js +0 -90
  259. package/dist/ErrorBlock/images/busy.png +0 -0
  260. package/dist/ErrorBlock/images/default.d.ts +0 -2
  261. package/dist/ErrorBlock/images/default.js +0 -166
  262. package/dist/ErrorBlock/images/default.png +0 -0
  263. package/dist/ErrorBlock/images/disconnected.d.ts +0 -2
  264. package/dist/ErrorBlock/images/disconnected.js +0 -123
  265. package/dist/ErrorBlock/images/disconnected.png +0 -0
  266. package/dist/ErrorBlock/images/empty.d.ts +0 -2
  267. package/dist/ErrorBlock/images/empty.js +0 -119
  268. package/dist/ErrorBlock/images/empty.png +0 -0
  269. package/dist/ErrorBlock/images/index.d.ts +0 -4
  270. package/dist/ErrorBlock/images/index.js +0 -4
  271. package/dist/ErrorBlock/style.scss +0 -62
  272. package/dist/Footer/demo/base.d.ts +0 -6
  273. package/dist/Footer/demo/base.js +0 -81
  274. package/dist/Footer/footer.d.ts +0 -20
  275. package/dist/Footer/footer.js +0 -66
  276. package/dist/Footer/style.scss +0 -55
  277. package/dist/Form/FormItem/form-item-input.d.ts +0 -12
  278. package/dist/Form/FormItem/form-item-input.js +0 -34
  279. package/dist/Form/FormItem/form-item-label.d.ts +0 -13
  280. package/dist/Form/FormItem/form-item-label.js +0 -25
  281. package/dist/Form/FormItem/form-item.d.ts +0 -17
  282. package/dist/Form/FormItem/form-item.js +0 -48
  283. package/dist/Form/FormItem/index.d.ts +0 -5
  284. package/dist/Form/FormItem/index.js +0 -3
  285. package/dist/Form/context.d.ts +0 -11
  286. package/dist/Form/context.js +0 -6
  287. package/dist/Form/demo/base.d.ts +0 -3
  288. package/dist/Form/demo/base.js +0 -76
  289. package/dist/Form/form.d.ts +0 -39
  290. package/dist/Form/form.js +0 -28
  291. package/dist/Form/hooks/useForm.d.ts +0 -2
  292. package/dist/Form/hooks/useForm.js +0 -24
  293. package/dist/Form/hooks/useFormContext.d.ts +0 -2
  294. package/dist/Form/hooks/useFormContext.js +0 -6
  295. package/dist/Form/interface.d.ts +0 -3
  296. package/dist/Form/interface.js +0 -1
  297. package/dist/Form/style.scss +0 -42
  298. package/dist/Grid/demo/base.d.ts +0 -7
  299. package/dist/Grid/demo/base.js +0 -46
  300. package/dist/Grid/demo/base.scss +0 -7
  301. package/dist/Grid/grid.d.ts +0 -16
  302. package/dist/Grid/grid.js +0 -36
  303. package/dist/Grid/style.scss +0 -17
  304. package/dist/Icon/demo/base.d.ts +0 -6
  305. package/dist/Icon/demo/base.js +0 -41
  306. package/dist/Images/broken-image-icon.d.ts +0 -2
  307. package/dist/Images/broken-image-icon.js +0 -11
  308. package/dist/Images/demo/base.d.ts +0 -4
  309. package/dist/Images/demo/base.js +0 -101
  310. package/dist/Images/demo/base.scss +0 -4
  311. package/dist/Images/image-icon.d.ts +0 -2
  312. package/dist/Images/image-icon.js +0 -11
  313. package/dist/Images/image.d.ts +0 -19
  314. package/dist/Images/image.js +0 -114
  315. package/dist/Images/index.d.ts +0 -4
  316. package/dist/Images/index.js +0 -3
  317. package/dist/Images/lazy-detector.d.ts +0 -6
  318. package/dist/Images/lazy-detector.js +0 -22
  319. package/dist/Images/style.scss +0 -30
  320. package/dist/Input/base-input.d.ts +0 -14
  321. package/dist/Input/base-input.js +0 -54
  322. package/dist/Input/demo/base.d.ts +0 -3
  323. package/dist/Input/demo/base.js +0 -25
  324. package/dist/Input/index.scss +0 -160
  325. package/dist/Input/input-affix-wrapper.d.ts +0 -8
  326. package/dist/Input/input-affix-wrapper.js +0 -50
  327. package/dist/Input/input-opt.d.ts +0 -16
  328. package/dist/Input/input-opt.js +0 -91
  329. package/dist/Input/input-password.d.ts +0 -7
  330. package/dist/Input/input-password.js +0 -47
  331. package/dist/Input/input.d.ts +0 -15
  332. package/dist/Input/input.js +0 -47
  333. package/dist/Input/native-input.d.ts +0 -10
  334. package/dist/Input/native-input.js +0 -30
  335. package/dist/InputNumber/demo/base.d.ts +0 -3
  336. package/dist/InputNumber/demo/base.js +0 -13
  337. package/dist/InputNumber/input-number.d.ts +0 -13
  338. package/dist/InputNumber/input-number.js +0 -65
  339. package/dist/InputNumber/style.scss +0 -32
  340. package/dist/Mark/demo/base.d.ts +0 -4
  341. package/dist/Mark/demo/base.js +0 -158
  342. package/dist/Mark/demo/base.scss +0 -14
  343. package/dist/Mark/index.d.ts +0 -4
  344. package/dist/Mark/index.js +0 -3
  345. package/dist/Mark/mark.d.ts +0 -20
  346. package/dist/Mark/mark.js +0 -110
  347. package/dist/Mark/style.scss +0 -24
  348. package/dist/Mask/mask.d.ts +0 -10
  349. package/dist/Mask/mask.js +0 -25
  350. package/dist/Mask/style.scss +0 -17
  351. package/dist/NavBar/demo/base.d.ts +0 -4
  352. package/dist/NavBar/demo/base.js +0 -70
  353. package/dist/NavBar/demo/base.scss +0 -5
  354. package/dist/NavBar/nav-bar.d.ts +0 -31
  355. package/dist/NavBar/nav-bar.js +0 -36
  356. package/dist/NavBar/style.scss +0 -61
  357. package/dist/NoticeBar/demo/base.d.ts +0 -3
  358. package/dist/NoticeBar/demo/base.js +0 -90
  359. package/dist/NoticeBar/notice-bar.d.ts +0 -64
  360. package/dist/NoticeBar/notice-bar.js +0 -112
  361. package/dist/NoticeBar/style.scss +0 -130
  362. package/dist/PageIndicator/demo/base.d.ts +0 -3
  363. package/dist/PageIndicator/demo/base.js +0 -41
  364. package/dist/PageIndicator/page-indicator.d.ts +0 -10
  365. package/dist/PageIndicator/page-indicator.js +0 -27
  366. package/dist/PageIndicator/style.scss +0 -59
  367. package/dist/Picker/demo/base.d.ts +0 -3
  368. package/dist/Picker/demo/base.js +0 -56
  369. package/dist/Picker/picker.d.ts +0 -19
  370. package/dist/Picker/picker.js +0 -94
  371. package/dist/Picker/style.scss +0 -37
  372. package/dist/PickerView/demo/base.d.ts +0 -3
  373. package/dist/PickerView/demo/base.js +0 -36
  374. package/dist/PickerView/picker-view-column-item.d.ts +0 -7
  375. package/dist/PickerView/picker-view-column-item.js +0 -11
  376. package/dist/PickerView/picker-view-column.d.ts +0 -10
  377. package/dist/PickerView/picker-view-column.js +0 -117
  378. package/dist/PickerView/picker-view.d.ts +0 -11
  379. package/dist/PickerView/picker-view.js +0 -57
  380. package/dist/PickerView/style.scss +0 -72
  381. package/dist/PickerView/types.d.ts +0 -4
  382. package/dist/PickerView/types.js +0 -1
  383. package/dist/Popup/demo/base.d.ts +0 -3
  384. package/dist/Popup/demo/base.js +0 -98
  385. package/dist/Popup/popup-modal.d.ts +0 -54
  386. package/dist/Popup/popup-modal.js +0 -87
  387. package/dist/Popup/popup.d.ts +0 -10
  388. package/dist/Popup/popup.js +0 -52
  389. package/dist/Popup/style.scss +0 -53
  390. package/dist/ProgressBar/demo/base.d.ts +0 -3
  391. package/dist/ProgressBar/demo/base.js +0 -114
  392. package/dist/ProgressBar/index.d.ts +0 -2
  393. package/dist/ProgressBar/index.js +0 -2
  394. package/dist/ProgressBar/progress-bar.d.ts +0 -27
  395. package/dist/ProgressBar/progress-bar.js +0 -38
  396. package/dist/ProgressBar/style.scss +0 -34
  397. package/dist/Radio/GroupContext.d.ts +0 -9
  398. package/dist/Radio/GroupContext.js +0 -2
  399. package/dist/Radio/RadioButton.d.ts +0 -3
  400. package/dist/Radio/RadioButton.js +0 -60
  401. package/dist/Radio/RadioGroup.d.ts +0 -3
  402. package/dist/Radio/RadioGroup.js +0 -48
  403. package/dist/Radio/demo/base.d.ts +0 -4
  404. package/dist/Radio/demo/base.js +0 -84
  405. package/dist/Radio/demo/base.scss +0 -4
  406. package/dist/Radio/radio.d.ts +0 -4
  407. package/dist/Radio/radio.js +0 -68
  408. package/dist/Radio/style.scss +0 -116
  409. package/dist/Radio/types.d.ts +0 -55
  410. package/dist/Radio/types.js +0 -1
  411. package/dist/Rate/demo/base.d.ts +0 -3
  412. package/dist/Rate/demo/base.js +0 -59
  413. package/dist/Rate/rate.d.ts +0 -51
  414. package/dist/Rate/rate.js +0 -100
  415. package/dist/Rate/style.scss +0 -37
  416. package/dist/Result/demo/base.d.ts +0 -3
  417. package/dist/Result/demo/base.js +0 -57
  418. package/dist/Result/result.d.ts +0 -10
  419. package/dist/Result/result.js +0 -28
  420. package/dist/Result/style.scss +0 -73
  421. package/dist/Result/use-result-icon.d.ts +0 -2
  422. package/dist/Result/use-result-icon.js +0 -53
  423. package/dist/SafeArea/demo/base.d.ts +0 -3
  424. package/dist/SafeArea/demo/base.js +0 -17
  425. package/dist/SafeArea/demo/base.scss +0 -18
  426. package/dist/SafeArea/safe-area.d.ts +0 -12
  427. package/dist/SafeArea/safe-area.js +0 -15
  428. package/dist/SafeArea/style.scss +0 -17
  429. package/dist/Scaffold/demo/base.d.ts +0 -3
  430. package/dist/Scaffold/demo/base.js +0 -30
  431. package/dist/Scaffold/scaffold.d.ts +0 -8
  432. package/dist/Scaffold/scaffold.js +0 -19
  433. package/dist/Scaffold/style.scss +0 -16
  434. package/dist/ScrollView/demo/base.d.ts +0 -3
  435. package/dist/ScrollView/demo/base.js +0 -43
  436. package/dist/ScrollView/scroll-view.d.ts +0 -24
  437. package/dist/ScrollView/scroll-view.js +0 -84
  438. package/dist/ScrollView/style.scss +0 -19
  439. package/dist/SideBar/demo/base.d.ts +0 -3
  440. package/dist/SideBar/demo/base.js +0 -54
  441. package/dist/SideBar/demo/default-active.d.ts +0 -3
  442. package/dist/SideBar/demo/default-active.js +0 -34
  443. package/dist/SideBar/demo/scroll-mode.d.ts +0 -3
  444. package/dist/SideBar/demo/scroll-mode.js +0 -55
  445. package/dist/Space/demo/base.d.ts +0 -3
  446. package/dist/Space/demo/base.js +0 -120
  447. package/dist/Space/space.d.ts +0 -38
  448. package/dist/Space/space.js +0 -61
  449. package/dist/Space/style.scss +0 -77
  450. package/dist/SpinLoading/demo/base.d.ts +0 -3
  451. package/dist/SpinLoading/demo/base.js +0 -21
  452. package/dist/SpinLoading/spin-loading.d.ts +0 -10
  453. package/dist/SpinLoading/spin-loading.js +0 -59
  454. package/dist/SpinLoading/spin-loading.scss +0 -40
  455. package/dist/Switch/demo/base.d.ts +0 -3
  456. package/dist/Switch/demo/base.js +0 -104
  457. package/dist/Switch/spin-icon.d.ts +0 -3
  458. package/dist/Switch/spin-icon.js +0 -23
  459. package/dist/Switch/style.scss +0 -113
  460. package/dist/Switch/switch.d.ts +0 -15
  461. package/dist/TabBar/TabBarContext.d.ts +0 -10
  462. package/dist/TabBar/TabBarContext.js +0 -2
  463. package/dist/TabBar/demo/base.d.ts +0 -6
  464. package/dist/TabBar/demo/base.js +0 -26
  465. package/dist/TabBar/index.scss +0 -35
  466. package/dist/TabBar/tab-bar.d.ts +0 -59
  467. package/dist/TabBar/tab-bar.js +0 -83
  468. package/dist/Tabs/context.d.ts +0 -11
  469. package/dist/Tabs/context.js +0 -4
  470. package/dist/Tabs/demo/base.d.ts +0 -3
  471. package/dist/Tabs/demo/base.js +0 -59
  472. package/dist/Tabs/style.scss +0 -107
  473. package/dist/Tabs/tab-nav.d.ts +0 -9
  474. package/dist/Tabs/tab-nav.js +0 -25
  475. package/dist/Tabs/tab-pane.d.ts +0 -7
  476. package/dist/Tabs/tab-pane.js +0 -17
  477. package/dist/Tabs/tab.d.ts +0 -7
  478. package/dist/Tabs/tab.js +0 -6
  479. package/dist/Tabs/tabs.d.ts +0 -25
  480. package/dist/Tabs/tabs.js +0 -156
  481. package/dist/Tag/demo/base.d.ts +0 -7
  482. package/dist/Tag/demo/base.js +0 -67
  483. package/dist/Tag/demo/style.scss +0 -8
  484. package/dist/Tag/style.scss +0 -85
  485. package/dist/Tag/tag.d.ts +0 -30
  486. package/dist/Tag/tag.js +0 -44
  487. package/dist/Toast/demo/base.d.ts +0 -3
  488. package/dist/Toast/demo/base.js +0 -121
  489. package/dist/Toast/demo/component-mode.d.ts +0 -3
  490. package/dist/Toast/demo/component-mode.js +0 -32
  491. package/dist/Toast/style.scss +0 -63
  492. package/dist/Toast/toast-modal.d.ts +0 -18
  493. package/dist/Toast/toast-modal.js +0 -112
  494. package/dist/Toast/toast.d.ts +0 -20
  495. package/dist/Toast/toast.js +0 -112
  496. package/dist/VerificationCodeInput/demo/base.d.ts +0 -3
  497. package/dist/VerificationCodeInput/demo/base.js +0 -11
  498. package/dist/VerificationCodeInput/style.scss +0 -20
  499. package/dist/VerificationCodeInput/verification-code-input.d.ts +0 -25
  500. package/dist/VerificationCodeInput/verification-code-input.js +0 -99
  501. package/dist/WaterMark/demo/demo1.d.ts +0 -7
  502. package/dist/WaterMark/demo/demo1.js +0 -47
  503. package/dist/WaterMark/demo/demo1.scss +0 -6
  504. package/dist/WaterMark/demo/demo2.d.ts +0 -3
  505. package/dist/WaterMark/demo/demo2.js +0 -31
  506. package/dist/WaterMark/style.scss +0 -17
  507. package/dist/WaterMark/water-mark.d.ts +0 -22
  508. package/dist/WaterMark/water-mark.js +0 -108
  509. package/dist/style/index.d.ts +0 -1
  510. package/dist/style/index.js +0 -5
  511. package/dist/style/style.scss +0 -52
  512. package/dist/style/theme-dark.scss +0 -24
  513. package/dist/style/theme-default.scss +0 -54
  514. package/dist/style/variable.scss +0 -167
  515. package/dist/utils/attach-properties-to-component.d.ts +0 -1
  516. package/dist/utils/attach-properties-to-component.js +0 -9
  517. package/dist/utils/bound.d.ts +0 -1
  518. package/dist/utils/bound.js +0 -10
  519. package/dist/utils/can-use-dom.d.ts +0 -1
  520. package/dist/utils/can-use-dom.js +0 -1
  521. package/dist/utils/convert-px.d.ts +0 -1
  522. package/dist/utils/convert-px.js +0 -27
  523. package/dist/utils/dev-log.d.ts +0 -3
  524. package/dist/utils/dev-log.js +0 -36
  525. package/dist/utils/get-container.d.ts +0 -2
  526. package/dist/utils/get-container.js +0 -4
  527. package/dist/utils/get-scroll-parent.d.ts +0 -3
  528. package/dist/utils/get-scroll-parent.js +0 -23
  529. package/dist/utils/is-dev.d.ts +0 -1
  530. package/dist/utils/is-dev.js +0 -1
  531. package/dist/utils/lang.d.ts +0 -1
  532. package/dist/utils/lang.js +0 -1
  533. package/dist/utils/matrix.d.ts +0 -10
  534. package/dist/utils/matrix.js +0 -37
  535. package/dist/utils/reactNode.d.ts +0 -7
  536. package/dist/utils/reactNode.js +0 -13
  537. package/dist/utils/render-imperatively.d.ts +0 -14
  538. package/dist/utils/render-imperatively.js +0 -105
  539. package/dist/utils/render-to-body.d.ts +0 -2
  540. package/dist/utils/render-to-body.js +0 -13
  541. package/dist/utils/render-to-container.d.ts +0 -3
  542. package/dist/utils/render-to-container.js +0 -10
  543. package/dist/utils/render.d.ts +0 -9
  544. package/dist/utils/render.js +0 -87
  545. package/dist/utils/rubberband.d.ts +0 -2
  546. package/dist/utils/rubberband.js +0 -11
  547. package/dist/utils/should-render.d.ts +0 -10
  548. package/dist/utils/should-render.js +0 -12
  549. package/dist/utils/supports-passive.d.ts +0 -1
  550. package/dist/utils/supports-passive.js +0 -13
  551. package/dist/utils/taro-utils.d.ts +0 -1
  552. package/dist/utils/taro-utils.js +0 -6
  553. package/dist/utils/to-css-length.d.ts +0 -1
  554. package/dist/utils/to-css-length.js +0 -3
  555. package/dist/utils/type.d.ts +0 -65
  556. package/dist/utils/type.js +0 -48
  557. package/dist/utils/use-initialized.d.ts +0 -1
  558. package/dist/utils/use-initialized.js +0 -8
  559. package/dist/utils/use-isomorphic-update-layout-effect.d.ts +0 -2
  560. package/dist/utils/use-isomorphic-update-layout-effect.js +0 -2
  561. package/dist/utils/use-lock-scroll.d.ts +0 -2
  562. package/dist/utils/use-lock-scroll.js +0 -81
  563. package/dist/utils/use-mutation-effect.d.ts +0 -3
  564. package/dist/utils/use-mutation-effect.js +0 -26
  565. package/dist/utils/use-props-value.d.ts +0 -8
  566. package/dist/utils/use-props-value.js +0 -22
  567. package/dist/utils/use-resize-effect.d.ts +0 -2
  568. package/dist/utils/use-resize-effect.js +0 -23
  569. package/dist/utils/use-touch.d.ts +0 -17
  570. package/dist/utils/use-touch.js +0 -63
  571. package/dist/utils/validate.d.ts +0 -1
  572. package/dist/utils/validate.js +0 -4
  573. package/dist/utils/with-default-props.d.ts +0 -9
  574. package/dist/utils/with-default-props.js +0 -33
  575. package/dist/utils/with-stop-propagation.d.ts +0 -4
  576. package/dist/utils/with-stop-propagation.js +0 -38
  577. package/dist/utils/zIndex.d.ts +0 -1
  578. package/dist/utils/zIndex.js +0 -4
  579. package/dist/utils/zindexContext.d.ts +0 -3
  580. package/dist/utils/zindexContext.js +0 -6
  581. /package/dist/{CascaderView/types.js → types.js} +0 -0
@@ -1,10 +0,0 @@
1
- import { FC } from "react";
2
- import { PickerColumnOption } from "./types";
3
- type PickerViewColumnProps = {
4
- options?: PickerColumnOption[];
5
- labelInValue?: boolean;
6
- value?: any;
7
- onChange?: (value: any, index?: number) => void;
8
- };
9
- export declare const PickerViewColumn: FC<PickerViewColumnProps>;
10
- export {};
@@ -1,117 +0,0 @@
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, { useEffect, useState } from "react";
8
- import classNames from "classnames";
9
- import { PickerViewColumnItem } from "./picker-view-column-item";
10
- import _ from "lodash";
11
- var pickerViewCls = "triones-antm-picker-view";
12
- export var PickerViewColumn = /*#__PURE__*/React.memo(function (_ref) {
13
- var options = _ref.options,
14
- labelInValue = _ref.labelInValue,
15
- value = _ref.value,
16
- onChange = _ref.onChange;
17
- var _useState = useState(value || null),
18
- _useState2 = _slicedToArray(_useState, 2),
19
- internalValue = _useState2[0],
20
- setInternalValue = _useState2[1];
21
- var itemHeight = 34;
22
- var max = 0;
23
- var min = 0 - itemHeight * (_.size(options) - 1);
24
- var _useState3 = useState(false),
25
- _useState4 = _slicedToArray(_useState3, 2),
26
- touching = _useState4[0],
27
- setTouching = _useState4[1];
28
- var _React$useState = React.useState(),
29
- _React$useState2 = _slicedToArray(_React$useState, 2),
30
- touchPoint = _React$useState2[0],
31
- setTouchPoint = _React$useState2[1];
32
- var _useState5 = useState(0),
33
- _useState6 = _slicedToArray(_useState5, 2),
34
- translateY = _useState6[0],
35
- setTranslateY = _useState6[1];
36
- var handleSelectOption = function handleSelectOption(selectValue) {
37
- var valueIndex = _.findIndex(options, function (option) {
38
- if (labelInValue) {
39
- return option.value === selectValue.value;
40
- }
41
- return option.value === selectValue;
42
- });
43
- setTranslateY(0 - valueIndex * itemHeight);
44
- };
45
- useEffect(function () {
46
- if (value === undefined) {
47
- return;
48
- }
49
- if (value === internalValue) {
50
- return;
51
- }
52
- setInternalValue(value);
53
- handleSelectOption(value);
54
- }, [value]);
55
- useEffect(function () {
56
- if (!value) {
57
- var selectValue = labelInValue ? options === null || options === void 0 ? void 0 : options[0] : options === null || options === void 0 ? void 0 : options[0].value;
58
- setInternalValue(selectValue || null);
59
- onChange === null || onChange === void 0 || onChange(selectValue || null);
60
- handleSelectOption(selectValue);
61
- } else {
62
- handleSelectOption(value);
63
- }
64
- }, [options]);
65
- return /*#__PURE__*/React.createElement("div", {
66
- className: classNames("".concat(pickerViewCls, "-column"))
67
- }, /*#__PURE__*/React.createElement("div", {
68
- className: classNames("".concat(pickerViewCls, "-column-wheel")),
69
- style: {
70
- transform: "translate3d(0, ".concat(translateY, "px, 0)")
71
- },
72
- onTouchStart: function onTouchStart(event) {
73
- setTouching(true);
74
- var startPoint = {
75
- clientX: event.touches[0].clientX,
76
- clientY: event.touches[0].clientY
77
- };
78
- setTouchPoint(startPoint);
79
- },
80
- onTouchMove: function onTouchMove(event) {
81
- if (touching) {
82
- var movePoint = {
83
- clientX: event.touches[0].clientX,
84
- clientY: event.touches[0].clientY
85
- };
86
- if (translateY > max || translateY < min) {
87
- return;
88
- }
89
- setTranslateY(translateY + (movePoint.clientY - touchPoint.clientY));
90
- setTouchPoint(movePoint);
91
- }
92
- },
93
- onTouchEnd: function onTouchEnd(event) {
94
- setTouching(false);
95
- var selectIndex = 0;
96
- if (translateY > 0) {
97
- setTranslateY(0);
98
- selectIndex = 0;
99
- } else if (translateY < 0 - itemHeight * (_.size(options) - 1)) {
100
- setTranslateY(0 - itemHeight * (_.size(options) - 1));
101
- selectIndex = _.size(options) - 1;
102
- } else {
103
- var num = Math.abs(Math.round(translateY / itemHeight));
104
- setTranslateY(0 - num * itemHeight);
105
- selectIndex = num;
106
- }
107
- var selectValue = labelInValue ? options === null || options === void 0 ? void 0 : options[selectIndex] : options === null || options === void 0 ? void 0 : options[selectIndex].value;
108
- setInternalValue(selectValue);
109
- onChange === null || onChange === void 0 || onChange(selectValue);
110
- }
111
- }, !_.isEmpty(options) && (options === null || options === void 0 ? void 0 : options.map(function (option, index) {
112
- return /*#__PURE__*/React.createElement(PickerViewColumnItem, {
113
- option: option,
114
- key: "view-column-".concat(index)
115
- });
116
- }))));
117
- });
@@ -1,11 +0,0 @@
1
- import { FC } from "react";
2
- import { PickerColumnOption } from "./types";
3
- import "./style.scss";
4
- type PickerViewProps = {
5
- columns?: PickerColumnOption[][];
6
- labelInValue?: boolean;
7
- value?: any[];
8
- onChange?: (value: any[]) => void;
9
- };
10
- export declare const PickerView: FC<PickerViewProps>;
11
- export {};
@@ -1,57 +0,0 @@
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 _ from "lodash";
9
- import { PickerViewColumn } from "./picker-view-column";
10
- import React, { useEffect, useState } from "react";
11
- import "./style.scss";
12
- var pickerViewCls = "triones-antm-picker-view";
13
- export var PickerView = /*#__PURE__*/React.memo(function (_ref) {
14
- var columns = _ref.columns,
15
- labelInValue = _ref.labelInValue,
16
- value = _ref.value,
17
- _onChange = _ref.onChange;
18
- var _useState = useState(value || Array.from({
19
- length: _.size(columns)
20
- }).map(function () {
21
- return null;
22
- })),
23
- _useState2 = _slicedToArray(_useState, 2),
24
- internalValue = _useState2[0],
25
- setInternalValue = _useState2[1];
26
- useEffect(function () {
27
- if (value == undefined) {
28
- return;
29
- }
30
- if (value == internalValue) {
31
- return;
32
- }
33
- setInternalValue(value);
34
- }, [value]);
35
- return /*#__PURE__*/React.createElement("div", {
36
- className: classNames("".concat(pickerViewCls))
37
- }, !_.isEmpty(columns) && (columns === null || columns === void 0 ? void 0 : columns.map(function (column, index) {
38
- return /*#__PURE__*/React.createElement(PickerViewColumn, {
39
- key: "column-".concat(index),
40
- labelInValue: labelInValue,
41
- options: column,
42
- value: value === null || value === void 0 ? void 0 : value[index],
43
- onChange: function onChange(v) {
44
- internalValue[index] = v;
45
- _onChange === null || _onChange === void 0 || _onChange(internalValue);
46
- }
47
- });
48
- })), /*#__PURE__*/React.createElement("div", {
49
- className: classNames("".concat(pickerViewCls, "-mask"))
50
- }, /*#__PURE__*/React.createElement("div", {
51
- className: classNames("".concat(pickerViewCls, "-mask-top"))
52
- }), /*#__PURE__*/React.createElement("div", {
53
- className: classNames("".concat(pickerViewCls, "-mask-middle"))
54
- }), /*#__PURE__*/React.createElement("div", {
55
- className: classNames("".concat(pickerViewCls, "-mask-bottom"))
56
- })));
57
- });
@@ -1,72 +0,0 @@
1
- $pickerViewCls: 'triones-antm-picker-view';
2
- .#{$pickerViewCls} {
3
- width: 100%;
4
- height: var(--height,240Px);
5
- display: flex;
6
- position: relative;
7
- overflow: hidden;
8
- --item-height: 34Px;
9
- --item-font-size: 16Px;
10
-
11
- &-column {
12
- height: 100%;
13
- flex: 1 1;
14
- user-select: none;
15
- touch-action: none;
16
- position: relative;
17
- z-index: 0;
18
- &-wheel{
19
- width: 100%;
20
- cursor: grab;
21
- position: absolute;
22
- top: calc(50% - var(--item-height)/2);
23
- left: 0;
24
- }
25
-
26
- &-item {
27
- font-size: var(--item-font-size);
28
- padding: 0 6px;
29
- height: var(--item-height);
30
- display: flex;
31
- justify-content: center;
32
- align-items: center;
33
- &-label{
34
- overflow: hidden;
35
- text-overflow: ellipsis;
36
- white-space: nowrap;
37
- }
38
- }
39
- }
40
-
41
- &-mask {
42
- position: absolute;
43
- z-index: 10000;
44
- left: 0;
45
- top: 0;
46
- width: 100%;
47
- height: 100%;
48
- display: flex;
49
- flex-direction: column;
50
- pointer-events: none;
51
-
52
- &-top {
53
- background-color: white;
54
- flex: auto;
55
- mask: linear-gradient(0deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .8) 50%, #000);
56
- }
57
-
58
- &-middle {
59
- height: var(--item-height);
60
- box-sizing: border-box;
61
- flex: none;
62
- border-top: 1px solid #eee;
63
- border-bottom: 1px solid #eee;
64
- }
65
-
66
- &-bottom {
67
- background-color: white;
68
- flex: auto;
69
- mask: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .8) 50%, #000);
70
- }
71
- }
72
- }
@@ -1,4 +0,0 @@
1
- export type PickerColumnOption = {
2
- label?: string;
3
- value?: string;
4
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const _default: () => React.JSX.Element;
3
- export default _default;
@@ -1,98 +0,0 @@
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
- /**
8
- * compact: true
9
- */
10
- import { DemoBlock } from "../../DemoBlock";
11
- import React, { useEffect } from 'react';
12
- import Button from "../../Button";
13
- import Popup from "../index";
14
- export default (function () {
15
- var _React$useState = React.useState(false),
16
- _React$useState2 = _slicedToArray(_React$useState, 2),
17
- topOpen = _React$useState2[0],
18
- setTopOpen = _React$useState2[1];
19
- var _React$useState3 = React.useState(false),
20
- _React$useState4 = _slicedToArray(_React$useState3, 2),
21
- bottomOpen = _React$useState4[0],
22
- setBottomOpen = _React$useState4[1];
23
- var _React$useState5 = React.useState(false),
24
- _React$useState6 = _slicedToArray(_React$useState5, 2),
25
- leftOpen = _React$useState6[0],
26
- setLeftOpen = _React$useState6[1];
27
- var _React$useState7 = React.useState(false),
28
- _React$useState8 = _slicedToArray(_React$useState7, 2),
29
- rightOpen = _React$useState8[0],
30
- setRightOpen = _React$useState8[1];
31
- useEffect(function () {
32
- console.log("topOpen", topOpen);
33
- }, [topOpen]);
34
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
35
- title: "\u57FA\u7840\u7528\u6CD5"
36
- }, /*#__PURE__*/React.createElement(Popup, {
37
- open: topOpen,
38
- destroyOnClose: true,
39
- afterOpenChange: function afterOpenChange(o) {
40
- setTopOpen(o);
41
- }
42
- }, /*#__PURE__*/React.createElement("div", {
43
- style: {
44
- minHeight: "200px"
45
- }
46
- }, "\u9876\u90E8\u5F39\u51FA")), /*#__PURE__*/React.createElement(Button, {
47
- block: true,
48
- onClick: function onClick() {
49
- setTopOpen(true);
50
- }
51
- }, "\u9876\u90E8\u5F39\u51FA"), /*#__PURE__*/React.createElement(Popup, {
52
- open: bottomOpen,
53
- position: "bottom",
54
- closable: true,
55
- afterOpenChange: function afterOpenChange(o) {
56
- setBottomOpen(o);
57
- }
58
- }, /*#__PURE__*/React.createElement("div", {
59
- style: {
60
- minHeight: "200px"
61
- }
62
- }, "\u5E95\u90E8\u5F39\u51FA")), /*#__PURE__*/React.createElement(Button, {
63
- block: true,
64
- onClick: function onClick() {
65
- setBottomOpen(true);
66
- }
67
- }, "\u5E95\u90E8\u5F39\u51FA"), /*#__PURE__*/React.createElement(Popup, {
68
- open: leftOpen,
69
- position: "left",
70
- afterOpenChange: function afterOpenChange(o) {
71
- setLeftOpen(o);
72
- }
73
- }, /*#__PURE__*/React.createElement("div", {
74
- style: {
75
- minWidth: "200px"
76
- }
77
- }, "\u5DE6\u90E8\u5F39\u51FA")), /*#__PURE__*/React.createElement(Button, {
78
- block: true,
79
- onClick: function onClick() {
80
- setLeftOpen(true);
81
- }
82
- }, "\u5DE6\u90E8\u5F39\u51FA"), /*#__PURE__*/React.createElement(Popup, {
83
- open: rightOpen,
84
- position: "right",
85
- afterOpenChange: function afterOpenChange(o) {
86
- setRightOpen(o);
87
- }
88
- }, /*#__PURE__*/React.createElement("div", {
89
- style: {
90
- minWidth: "200px"
91
- }
92
- }, "\u53F3\u90E8\u5F39\u51FA")), /*#__PURE__*/React.createElement(Button, {
93
- block: true,
94
- onClick: function onClick() {
95
- setRightOpen(true);
96
- }
97
- }, "\u53F3\u90E8\u5F39\u51FA")));
98
- });
@@ -1,54 +0,0 @@
1
- import { CSSProperties, FC, PropsWithChildren } from "react";
2
- import "./style.scss";
3
- export type Position = "top" | "bottom" | "left" | "right";
4
- export type PopupModalProps = {
5
- /**
6
- * @description 样式
7
- * @default horizontal
8
- */
9
- styles?: {
10
- body?: CSSProperties;
11
- };
12
- /**
13
- * @description Modal 完全关闭后的回调
14
- * @default
15
- */
16
- afterClose?: () => void;
17
- /**
18
- * @description 是否打开
19
- * @default false
20
- */
21
- open?: boolean;
22
- /**
23
- * @description 打开位置
24
- * @default bottom
25
- */
26
- position?: Position;
27
- /**
28
- * @description 是否可以关闭(显示关闭按钮)
29
- * @default false
30
- */
31
- closable?: boolean;
32
- /**
33
- * @description 是否蒙层关闭
34
- * @default true
35
- */
36
- maskClosable?: boolean;
37
- /**
38
- * @description 关闭时销毁 Modal 里的子元素
39
- * @default false
40
- */
41
- destroyOnClose?: boolean;
42
- /**
43
- * @description 设置 Modal 的 z-index
44
- * @default 1000
45
- */
46
- zIndex?: number;
47
- /**
48
- * @description 打开和关闭 Modal 时动画结束后的回调
49
- * @default
50
- */
51
- afterOpenChange?: (open: boolean) => void;
52
- onDestroy?: () => void;
53
- };
54
- export declare const PopupModal: FC<PropsWithChildren<PopupModalProps>>;
@@ -1,87 +0,0 @@
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, { useEffect, useMemo } from "react";
8
- import classNames from "classnames";
9
- import "./style.scss";
10
- import { CloseOutline } from "@trionesdev/antd-taro-icons-react";
11
- import SafeArea from "../SafeArea";
12
- var popupCls = "triones-antm-popup";
13
- export var PopupModal = function PopupModal(_ref) {
14
- var children = _ref.children,
15
- styles = _ref.styles,
16
- afterClose = _ref.afterClose,
17
- open = _ref.open,
18
- _ref$position = _ref.position,
19
- position = _ref$position === void 0 ? 'bottom' : _ref$position,
20
- _ref$closable = _ref.closable,
21
- closable = _ref$closable === void 0 ? false : _ref$closable,
22
- _ref$maskClosable = _ref.maskClosable,
23
- maskClosable = _ref$maskClosable === void 0 ? true : _ref$maskClosable,
24
- _ref$destroyOnClose = _ref.destroyOnClose,
25
- destroyOnClose = _ref$destroyOnClose === void 0 ? false : _ref$destroyOnClose,
26
- _ref$zIndex = _ref.zIndex,
27
- zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
28
- afterOpenChange = _ref.afterOpenChange,
29
- onDestroy = _ref.onDestroy;
30
- var safeAreaPosition = useMemo(function () {
31
- if (position === 'bottom') {
32
- return 'bottom';
33
- } else if (position === 'top') {
34
- return 'top';
35
- }
36
- return undefined;
37
- }, [position]);
38
- var _React$useState = React.useState(open || false),
39
- _React$useState2 = _slicedToArray(_React$useState, 2),
40
- internalOpen = _React$useState2[0],
41
- setInternalOpen = _React$useState2[1];
42
- var handleClose = function handleClose() {
43
- setInternalOpen(false);
44
- afterClose === null || afterClose === void 0 || afterClose();
45
- };
46
- useEffect(function () {
47
- afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(internalOpen);
48
- if (!internalOpen) {
49
- if (destroyOnClose) {
50
- onDestroy === null || onDestroy === void 0 || onDestroy();
51
- }
52
- }
53
- }, [internalOpen]);
54
- useEffect(function () {
55
- if (open === undefined) {
56
- return;
57
- }
58
- if (open === internalOpen) {
59
- return;
60
- }
61
- setInternalOpen(open);
62
- }, [open]);
63
- return /*#__PURE__*/React.createElement("div", {
64
- className: classNames(popupCls),
65
- style: {
66
- zIndex: zIndex,
67
- display: internalOpen ? 'block' : 'none'
68
- }
69
- }, /*#__PURE__*/React.createElement("div", {
70
- className: classNames("".concat(popupCls, "-mask")),
71
- onClick: function onClick() {
72
- if (maskClosable) {
73
- handleClose();
74
- }
75
- }
76
- }), /*#__PURE__*/React.createElement("div", {
77
- className: classNames("".concat(popupCls, "-body"), "".concat(popupCls, "-").concat(position)),
78
- style: styles === null || styles === void 0 ? void 0 : styles.body
79
- }, closable && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CloseOutline, {
80
- className: classNames("".concat(popupCls, "-close")),
81
- onClick: function onClick() {
82
- handleClose();
83
- }
84
- })), /*#__PURE__*/React.createElement(SafeArea, {
85
- position: safeAreaPosition
86
- }, children)));
87
- };
@@ -1,10 +0,0 @@
1
- import { FC, PropsWithChildren } from "react";
2
- import { PopupModalProps } from "./popup-modal";
3
- export type PopupProps = Omit<PopupModalProps, 'onDestroy'> & {
4
- /**
5
- * @description 获取容器
6
- * @default null
7
- */
8
- getContainer?: () => HTMLElement;
9
- };
10
- export declare const Popup: FC<PropsWithChildren<PopupProps>>;
@@ -1,52 +0,0 @@
1
- var _excluded = ["children", "getContainer", "open"];
2
- 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); }
3
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
- 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."); }
5
- 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); }
6
- 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; }
7
- 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; } }
8
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9
- 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; }
10
- 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; }
11
- import React, { useEffect } from "react";
12
- import { createPortal } from "react-dom";
13
- import { PopupModal } from "./popup-modal";
14
- export var Popup = function Popup(_ref) {
15
- var children = _ref.children,
16
- getContainer = _ref.getContainer,
17
- _ref$open = _ref.open,
18
- open = _ref$open === void 0 ? false : _ref$open,
19
- rest = _objectWithoutProperties(_ref, _excluded);
20
- var _React$useState = React.useState(false),
21
- _React$useState2 = _slicedToArray(_React$useState, 2),
22
- renderEnable = _React$useState2[0],
23
- setRenderEnable = _React$useState2[1];
24
- var containerRef = React.useRef(null);
25
- var mountRef = React.useRef(null);
26
- var rootContainer = (getContainer === null || getContainer === void 0 ? void 0 : getContainer()) || containerRef.current;
27
- var Portal = function Portal() {
28
- if (!mountRef.current) {
29
- mountRef.current = document.createElement("div");
30
- rootContainer.appendChild(mountRef.current);
31
- }
32
- var destroy = function destroy() {
33
- if (rootContainer && mountRef.current) {
34
- rootContainer.removeChild(mountRef.current);
35
- }
36
- mountRef.current = null;
37
- setRenderEnable(false);
38
- };
39
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(PopupModal, _extends({}, rest, {
40
- onDestroy: destroy,
41
- open: open
42
- }), children), mountRef.current));
43
- };
44
- useEffect(function () {
45
- if (open && !renderEnable) {
46
- setRenderEnable(true);
47
- }
48
- }, [open]);
49
- return /*#__PURE__*/React.createElement(React.Fragment, null, !(getContainer !== null && getContainer !== void 0 && getContainer()) && /*#__PURE__*/React.createElement("div", {
50
- ref: containerRef
51
- }), renderEnable && /*#__PURE__*/React.createElement(Portal, null));
52
- };
@@ -1,53 +0,0 @@
1
- @import "../style/variable";
2
- $popupCls: 'triones-antm-popup';
3
-
4
- .#{$popupCls} {
5
- position: fixed;
6
- top: 0;
7
- left: 0;
8
- right: 0;
9
- bottom: 0;
10
-
11
- &-mask {
12
- height: 100%;
13
- width: 100%;
14
- background-color: rgba(0, 0, 0, .55);
15
- }
16
-
17
- &-close {
18
- position: absolute;
19
- right: 10Px;
20
- top: 10Px;
21
- }
22
-
23
- &-body {
24
- background-color: white;
25
- position: fixed;
26
- border-top-left-radius: $trionesBorderRadius;
27
- border-top-right-radius: $trionesBorderRadius;
28
- }
29
-
30
- &-top {
31
- top: 0;
32
- left: 0;
33
- right: 0;
34
- }
35
-
36
- &-bottom {
37
- bottom: 0;
38
- left: 0;
39
- right: 0;
40
- }
41
-
42
- &-left {
43
- left: 0;
44
- top: 0;
45
- bottom: 0;
46
- }
47
-
48
- &-right {
49
- right: 0;
50
- top: 0;
51
- bottom: 0;
52
- }
53
- }
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const _default: () => React.JSX.Element;
3
- export default _default;