@trionesdev/antd-taro-react 0.0.1-beta.3

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 (559) hide show
  1. package/LICENSE +21 -0
  2. package/dist/Alert/alert.d.ts +32 -0
  3. package/dist/Alert/alert.js +49 -0
  4. package/dist/Alert/demo/base.d.ts +3 -0
  5. package/dist/Alert/demo/base.js +56 -0
  6. package/dist/Alert/index.d.ts +3 -0
  7. package/dist/Alert/index.js +2 -0
  8. package/dist/Alert/style.scss +69 -0
  9. package/dist/Avatar/avatar.d.ts +14 -0
  10. package/dist/Avatar/avatar.js +40 -0
  11. package/dist/Avatar/demo/base.d.ts +7 -0
  12. package/dist/Avatar/demo/base.js +109 -0
  13. package/dist/Avatar/demo/style.scss +6 -0
  14. package/dist/Avatar/index.d.ts +2 -0
  15. package/dist/Avatar/index.js +2 -0
  16. package/dist/Avatar/style.scss +16 -0
  17. package/dist/Badge/badge.d.ts +14 -0
  18. package/dist/Badge/badge.js +82 -0
  19. package/dist/Badge/demo/base.d.ts +7 -0
  20. package/dist/Badge/demo/base.js +167 -0
  21. package/dist/Badge/demo/base.scss +6 -0
  22. package/dist/Badge/index.d.ts +3 -0
  23. package/dist/Badge/index.js +2 -0
  24. package/dist/Badge/style.scss +100 -0
  25. package/dist/Button/button.d.ts +53 -0
  26. package/dist/Button/button.js +59 -0
  27. package/dist/Button/demo/base.d.ts +3 -0
  28. package/dist/Button/demo/base.js +163 -0
  29. package/dist/Button/index.d.ts +3 -0
  30. package/dist/Button/index.js +2 -0
  31. package/dist/Button/style.scss +193 -0
  32. package/dist/Calendar/calendar-grid.d.ts +27 -0
  33. package/dist/Calendar/calendar-grid.js +164 -0
  34. package/dist/Calendar/calendar-header.d.ts +7 -0
  35. package/dist/Calendar/calendar-header.js +42 -0
  36. package/dist/Calendar/calendar-range.d.ts +9 -0
  37. package/dist/Calendar/calendar-range.js +47 -0
  38. package/dist/Calendar/calendar.d.ts +8 -0
  39. package/dist/Calendar/calendar.js +35 -0
  40. package/dist/Calendar/demo/calendar.d.ts +3 -0
  41. package/dist/Calendar/demo/calendar.js +10 -0
  42. package/dist/Calendar/demo/grid.d.ts +3 -0
  43. package/dist/Calendar/demo/grid.js +12 -0
  44. package/dist/Calendar/demo/touch-grid.d.ts +3 -0
  45. package/dist/Calendar/demo/touch-grid.js +8 -0
  46. package/dist/Calendar/index.d.ts +11 -0
  47. package/dist/Calendar/index.js +8 -0
  48. package/dist/Calendar/style.scss +85 -0
  49. package/dist/Calendar/touchable-calendar-grid.d.ts +14 -0
  50. package/dist/Calendar/touchable-calendar-grid.js +425 -0
  51. package/dist/CalendarPicker/calendar-picker.d.ts +4 -0
  52. package/dist/CalendarPicker/calendar-picker.js +87 -0
  53. package/dist/CalendarPicker/calendar-range-picker.d.ts +4 -0
  54. package/dist/CalendarPicker/calendar-range-picker.js +87 -0
  55. package/dist/CalendarPicker/demo/base.d.ts +3 -0
  56. package/dist/CalendarPicker/demo/base.js +65 -0
  57. package/dist/CalendarPicker/index.d.ts +9 -0
  58. package/dist/CalendarPicker/index.js +5 -0
  59. package/dist/CalendarPicker/style.scss +20 -0
  60. package/dist/CalendarPicker/types.d.ts +21 -0
  61. package/dist/CalendarPicker/types.js +1 -0
  62. package/dist/Card/card.d.ts +17 -0
  63. package/dist/Card/card.js +36 -0
  64. package/dist/Card/demo/base.d.ts +4 -0
  65. package/dist/Card/demo/base.js +63 -0
  66. package/dist/Card/demo/base.scss +18 -0
  67. package/dist/Card/index.d.ts +4 -0
  68. package/dist/Card/index.js +3 -0
  69. package/dist/Card/native-props.d.ts +8 -0
  70. package/dist/Card/native-props.js +27 -0
  71. package/dist/Card/style.scss +31 -0
  72. package/dist/CascaderPicker/cascader-picker.d.ts +20 -0
  73. package/dist/CascaderPicker/cascader-picker.js +106 -0
  74. package/dist/CascaderPicker/demo/base.d.ts +3 -0
  75. package/dist/CascaderPicker/demo/base.js +85 -0
  76. package/dist/CascaderPicker/index.d.ts +3 -0
  77. package/dist/CascaderPicker/index.js +2 -0
  78. package/dist/CascaderPicker/style.scss +39 -0
  79. package/dist/CascaderView/cascader-column-item.d.ts +8 -0
  80. package/dist/CascaderView/cascader-column-item.js +19 -0
  81. package/dist/CascaderView/cascader-column.d.ts +9 -0
  82. package/dist/CascaderView/cascader-column.js +26 -0
  83. package/dist/CascaderView/cascader-view.d.ts +12 -0
  84. package/dist/CascaderView/cascader-view.js +120 -0
  85. package/dist/CascaderView/demo/async.d.ts +3 -0
  86. package/dist/CascaderView/demo/async.js +41 -0
  87. package/dist/CascaderView/demo/base.d.ts +3 -0
  88. package/dist/CascaderView/demo/base.js +62 -0
  89. package/dist/CascaderView/demo/value.d.ts +3 -0
  90. package/dist/CascaderView/demo/value.js +63 -0
  91. package/dist/CascaderView/index.d.ts +3 -0
  92. package/dist/CascaderView/index.js +2 -0
  93. package/dist/CascaderView/style.scss +20 -0
  94. package/dist/CascaderView/types.d.ts +10 -0
  95. package/dist/CascaderView/types.js +1 -0
  96. package/dist/Checkbox/checkbox-button.d.ts +3 -0
  97. package/dist/Checkbox/checkbox-button.js +42 -0
  98. package/dist/Checkbox/checkbox-group.d.ts +3 -0
  99. package/dist/Checkbox/checkbox-group.js +32 -0
  100. package/dist/Checkbox/checkbox.d.ts +4 -0
  101. package/dist/Checkbox/checkbox.js +43 -0
  102. package/dist/Checkbox/demo/base.d.ts +6 -0
  103. package/dist/Checkbox/demo/base.js +42 -0
  104. package/dist/Checkbox/demo/disabled.d.ts +3 -0
  105. package/dist/Checkbox/demo/disabled.js +19 -0
  106. package/dist/Checkbox/group-context.d.ts +3 -0
  107. package/dist/Checkbox/group-context.js +2 -0
  108. package/dist/Checkbox/index.d.ts +9 -0
  109. package/dist/Checkbox/index.js +11 -0
  110. package/dist/Checkbox/index.scss +151 -0
  111. package/dist/Checkbox/types.d.ts +19 -0
  112. package/dist/Checkbox/types.js +1 -0
  113. package/dist/ConfigProvider/config-provider.d.ts +57 -0
  114. package/dist/ConfigProvider/config-provider.js +41 -0
  115. package/dist/ConfigProvider/demo/base.d.ts +6 -0
  116. package/dist/ConfigProvider/demo/base.js +24 -0
  117. package/dist/ConfigProvider/index.d.ts +4 -0
  118. package/dist/ConfigProvider/index.js +3 -0
  119. package/dist/DemoBlock/index.d.ts +10 -0
  120. package/dist/DemoBlock/index.js +15 -0
  121. package/dist/DemoBlock/index.scss +20 -0
  122. package/dist/DemoDescription/index.d.ts +6 -0
  123. package/dist/DemoDescription/index.js +7 -0
  124. package/dist/DemoDescription/index.scss +3 -0
  125. package/dist/Divider/demo/base.d.ts +3 -0
  126. package/dist/Divider/demo/base.js +35 -0
  127. package/dist/Divider/divider.d.ts +17 -0
  128. package/dist/Divider/divider.js +36 -0
  129. package/dist/Divider/index.d.ts +2 -0
  130. package/dist/Divider/index.js +2 -0
  131. package/dist/Divider/style.scss +62 -0
  132. package/dist/Ellipsis/demo/base.d.ts +3 -0
  133. package/dist/Ellipsis/demo/base.js +81 -0
  134. package/dist/Ellipsis/ellipsis.d.ts +16 -0
  135. package/dist/Ellipsis/ellipsis.js +79 -0
  136. package/dist/Ellipsis/index.d.ts +3 -0
  137. package/dist/Ellipsis/index.js +2 -0
  138. package/dist/Ellipsis/style.scss +13 -0
  139. package/dist/Ellipsis/useMeasure.d.ts +2 -0
  140. package/dist/Ellipsis/useMeasure.js +123 -0
  141. package/dist/Empty/demo/base.d.ts +3 -0
  142. package/dist/Empty/demo/base.js +38 -0
  143. package/dist/Empty/empty.d.ts +3 -0
  144. package/dist/Empty/empty.js +48 -0
  145. package/dist/Empty/index.d.ts +12 -0
  146. package/dist/Empty/index.js +49 -0
  147. package/dist/Empty/style.scss +22 -0
  148. package/dist/ErrorBlock/create-error-block.d.ts +13 -0
  149. package/dist/ErrorBlock/create-error-block.js +45 -0
  150. package/dist/ErrorBlock/demo/base.d.ts +3 -0
  151. package/dist/ErrorBlock/demo/base.js +23 -0
  152. package/dist/ErrorBlock/error-block.d.ts +2 -0
  153. package/dist/ErrorBlock/error-block.js +9 -0
  154. package/dist/ErrorBlock/images/busy.d.ts +2 -0
  155. package/dist/ErrorBlock/images/busy.js +90 -0
  156. package/dist/ErrorBlock/images/busy.png +0 -0
  157. package/dist/ErrorBlock/images/default.d.ts +2 -0
  158. package/dist/ErrorBlock/images/default.js +166 -0
  159. package/dist/ErrorBlock/images/default.png +0 -0
  160. package/dist/ErrorBlock/images/disconnected.d.ts +2 -0
  161. package/dist/ErrorBlock/images/disconnected.js +123 -0
  162. package/dist/ErrorBlock/images/disconnected.png +0 -0
  163. package/dist/ErrorBlock/images/empty.d.ts +2 -0
  164. package/dist/ErrorBlock/images/empty.js +119 -0
  165. package/dist/ErrorBlock/images/empty.png +0 -0
  166. package/dist/ErrorBlock/images/index.d.ts +4 -0
  167. package/dist/ErrorBlock/images/index.js +4 -0
  168. package/dist/ErrorBlock/index.d.ts +7 -0
  169. package/dist/ErrorBlock/index.js +3 -0
  170. package/dist/ErrorBlock/style.scss +62 -0
  171. package/dist/Footer/demo/base.d.ts +6 -0
  172. package/dist/Footer/demo/base.js +81 -0
  173. package/dist/Footer/footer.d.ts +20 -0
  174. package/dist/Footer/footer.js +66 -0
  175. package/dist/Footer/index.d.ts +3 -0
  176. package/dist/Footer/index.js +2 -0
  177. package/dist/Footer/style.scss +55 -0
  178. package/dist/Form/FormItem/form-item-input.d.ts +12 -0
  179. package/dist/Form/FormItem/form-item-input.js +34 -0
  180. package/dist/Form/FormItem/form-item-label.d.ts +13 -0
  181. package/dist/Form/FormItem/form-item-label.js +25 -0
  182. package/dist/Form/FormItem/form-item.d.ts +17 -0
  183. package/dist/Form/FormItem/form-item.js +48 -0
  184. package/dist/Form/FormItem/index.d.ts +5 -0
  185. package/dist/Form/FormItem/index.js +3 -0
  186. package/dist/Form/context.d.ts +11 -0
  187. package/dist/Form/context.js +6 -0
  188. package/dist/Form/demo/base.d.ts +3 -0
  189. package/dist/Form/demo/base.js +76 -0
  190. package/dist/Form/form.d.ts +39 -0
  191. package/dist/Form/form.js +28 -0
  192. package/dist/Form/hooks/useForm.d.ts +2 -0
  193. package/dist/Form/hooks/useForm.js +24 -0
  194. package/dist/Form/hooks/useFormContext.d.ts +2 -0
  195. package/dist/Form/hooks/useFormContext.js +6 -0
  196. package/dist/Form/index.d.ts +12 -0
  197. package/dist/Form/index.js +8 -0
  198. package/dist/Form/interface.d.ts +3 -0
  199. package/dist/Form/interface.js +1 -0
  200. package/dist/Form/style.scss +42 -0
  201. package/dist/Grid/demo/base.d.ts +7 -0
  202. package/dist/Grid/demo/base.js +46 -0
  203. package/dist/Grid/demo/base.scss +7 -0
  204. package/dist/Grid/grid.d.ts +16 -0
  205. package/dist/Grid/grid.js +36 -0
  206. package/dist/Grid/index.d.ts +7 -0
  207. package/dist/Grid/index.js +4 -0
  208. package/dist/Grid/style.scss +17 -0
  209. package/dist/Icon/check-icon.d.ts +3 -0
  210. package/dist/Icon/check-icon.js +10 -0
  211. package/dist/Icon/demo/base.d.ts +6 -0
  212. package/dist/Icon/demo/base.js +41 -0
  213. package/dist/Images/broken-image-icon.d.ts +2 -0
  214. package/dist/Images/broken-image-icon.js +11 -0
  215. package/dist/Images/demo/base.d.ts +4 -0
  216. package/dist/Images/demo/base.js +101 -0
  217. package/dist/Images/demo/base.scss +4 -0
  218. package/dist/Images/image-icon.d.ts +2 -0
  219. package/dist/Images/image-icon.js +11 -0
  220. package/dist/Images/image.d.ts +19 -0
  221. package/dist/Images/image.js +114 -0
  222. package/dist/Images/index.d.ts +4 -0
  223. package/dist/Images/index.js +3 -0
  224. package/dist/Images/lazy-detector.d.ts +6 -0
  225. package/dist/Images/lazy-detector.js +22 -0
  226. package/dist/Images/style.scss +30 -0
  227. package/dist/Input/base-input.d.ts +14 -0
  228. package/dist/Input/base-input.js +54 -0
  229. package/dist/Input/demo/base.d.ts +3 -0
  230. package/dist/Input/demo/base.js +25 -0
  231. package/dist/Input/index.d.ts +10 -0
  232. package/dist/Input/index.js +7 -0
  233. package/dist/Input/index.scss +160 -0
  234. package/dist/Input/input-affix-wrapper.d.ts +8 -0
  235. package/dist/Input/input-affix-wrapper.js +50 -0
  236. package/dist/Input/input-opt.d.ts +16 -0
  237. package/dist/Input/input-opt.js +91 -0
  238. package/dist/Input/input-password.d.ts +7 -0
  239. package/dist/Input/input-password.js +47 -0
  240. package/dist/Input/input.d.ts +15 -0
  241. package/dist/Input/input.js +47 -0
  242. package/dist/Input/native-input.d.ts +10 -0
  243. package/dist/Input/native-input.js +30 -0
  244. package/dist/InputNumber/demo/base.d.ts +3 -0
  245. package/dist/InputNumber/demo/base.js +13 -0
  246. package/dist/InputNumber/index.d.ts +3 -0
  247. package/dist/InputNumber/index.js +2 -0
  248. package/dist/InputNumber/input-number.d.ts +13 -0
  249. package/dist/InputNumber/input-number.js +65 -0
  250. package/dist/InputNumber/style.scss +32 -0
  251. package/dist/Mark/demo/base.d.ts +4 -0
  252. package/dist/Mark/demo/base.js +158 -0
  253. package/dist/Mark/demo/base.scss +14 -0
  254. package/dist/Mark/index.d.ts +4 -0
  255. package/dist/Mark/index.js +3 -0
  256. package/dist/Mark/mark.d.ts +20 -0
  257. package/dist/Mark/mark.js +110 -0
  258. package/dist/Mark/style.scss +24 -0
  259. package/dist/Mask/index.d.ts +2 -0
  260. package/dist/Mask/index.js +2 -0
  261. package/dist/Mask/mask.d.ts +10 -0
  262. package/dist/Mask/mask.js +25 -0
  263. package/dist/Mask/style.scss +17 -0
  264. package/dist/NavBar/demo/base.d.ts +4 -0
  265. package/dist/NavBar/demo/base.js +70 -0
  266. package/dist/NavBar/demo/base.scss +5 -0
  267. package/dist/NavBar/index.d.ts +3 -0
  268. package/dist/NavBar/index.js +2 -0
  269. package/dist/NavBar/nav-bar.d.ts +31 -0
  270. package/dist/NavBar/nav-bar.js +36 -0
  271. package/dist/NavBar/style.scss +61 -0
  272. package/dist/NoticeBar/demo/base.d.ts +3 -0
  273. package/dist/NoticeBar/demo/base.js +90 -0
  274. package/dist/NoticeBar/index.d.ts +3 -0
  275. package/dist/NoticeBar/index.js +2 -0
  276. package/dist/NoticeBar/notice-bar.d.ts +64 -0
  277. package/dist/NoticeBar/notice-bar.js +112 -0
  278. package/dist/NoticeBar/style.scss +130 -0
  279. package/dist/PageIndicator/demo/base.d.ts +3 -0
  280. package/dist/PageIndicator/demo/base.js +41 -0
  281. package/dist/PageIndicator/index.d.ts +3 -0
  282. package/dist/PageIndicator/index.js +2 -0
  283. package/dist/PageIndicator/page-indicator.d.ts +10 -0
  284. package/dist/PageIndicator/page-indicator.js +27 -0
  285. package/dist/PageIndicator/style.scss +59 -0
  286. package/dist/Picker/demo/base.d.ts +3 -0
  287. package/dist/Picker/demo/base.js +56 -0
  288. package/dist/Picker/index.d.ts +3 -0
  289. package/dist/Picker/index.js +2 -0
  290. package/dist/Picker/picker.d.ts +19 -0
  291. package/dist/Picker/picker.js +94 -0
  292. package/dist/Picker/style.scss +37 -0
  293. package/dist/PickerView/demo/base.d.ts +3 -0
  294. package/dist/PickerView/demo/base.js +36 -0
  295. package/dist/PickerView/index.d.ts +4 -0
  296. package/dist/PickerView/index.js +2 -0
  297. package/dist/PickerView/picker-view-column-item.d.ts +7 -0
  298. package/dist/PickerView/picker-view-column-item.js +11 -0
  299. package/dist/PickerView/picker-view-column.d.ts +10 -0
  300. package/dist/PickerView/picker-view-column.js +117 -0
  301. package/dist/PickerView/picker-view.d.ts +11 -0
  302. package/dist/PickerView/picker-view.js +57 -0
  303. package/dist/PickerView/style.scss +72 -0
  304. package/dist/PickerView/types.d.ts +4 -0
  305. package/dist/PickerView/types.js +1 -0
  306. package/dist/Popup/demo/base.d.ts +3 -0
  307. package/dist/Popup/demo/base.js +98 -0
  308. package/dist/Popup/index.d.ts +3 -0
  309. package/dist/Popup/index.js +2 -0
  310. package/dist/Popup/popup-modal.d.ts +54 -0
  311. package/dist/Popup/popup-modal.js +87 -0
  312. package/dist/Popup/popup.d.ts +10 -0
  313. package/dist/Popup/popup.js +52 -0
  314. package/dist/Popup/style.scss +53 -0
  315. package/dist/ProgressBar/demo/base.d.ts +3 -0
  316. package/dist/ProgressBar/demo/base.js +114 -0
  317. package/dist/ProgressBar/index.d.ts +2 -0
  318. package/dist/ProgressBar/index.js +2 -0
  319. package/dist/ProgressBar/progress-bar.d.ts +27 -0
  320. package/dist/ProgressBar/progress-bar.js +38 -0
  321. package/dist/ProgressBar/style.scss +34 -0
  322. package/dist/Radio/GroupContext.d.ts +9 -0
  323. package/dist/Radio/GroupContext.js +2 -0
  324. package/dist/Radio/RadioButton.d.ts +3 -0
  325. package/dist/Radio/RadioButton.js +60 -0
  326. package/dist/Radio/RadioGroup.d.ts +3 -0
  327. package/dist/Radio/RadioGroup.js +48 -0
  328. package/dist/Radio/demo/base.d.ts +4 -0
  329. package/dist/Radio/demo/base.js +84 -0
  330. package/dist/Radio/demo/base.scss +4 -0
  331. package/dist/Radio/index.d.ts +11 -0
  332. package/dist/Radio/index.js +14 -0
  333. package/dist/Radio/radio.d.ts +4 -0
  334. package/dist/Radio/radio.js +68 -0
  335. package/dist/Radio/style.scss +116 -0
  336. package/dist/Radio/types.d.ts +55 -0
  337. package/dist/Radio/types.js +1 -0
  338. package/dist/Rate/demo/base.d.ts +3 -0
  339. package/dist/Rate/demo/base.js +59 -0
  340. package/dist/Rate/index.d.ts +2 -0
  341. package/dist/Rate/index.js +2 -0
  342. package/dist/Rate/rate.d.ts +51 -0
  343. package/dist/Rate/rate.js +100 -0
  344. package/dist/Rate/style.scss +37 -0
  345. package/dist/Result/demo/base.d.ts +3 -0
  346. package/dist/Result/demo/base.js +57 -0
  347. package/dist/Result/index.d.ts +3 -0
  348. package/dist/Result/index.js +2 -0
  349. package/dist/Result/result.d.ts +10 -0
  350. package/dist/Result/result.js +28 -0
  351. package/dist/Result/style.scss +73 -0
  352. package/dist/Result/use-result-icon.d.ts +2 -0
  353. package/dist/Result/use-result-icon.js +53 -0
  354. package/dist/SafeArea/demo/base.d.ts +3 -0
  355. package/dist/SafeArea/demo/base.js +17 -0
  356. package/dist/SafeArea/demo/base.scss +18 -0
  357. package/dist/SafeArea/index.d.ts +4 -0
  358. package/dist/SafeArea/index.js +3 -0
  359. package/dist/SafeArea/safe-area.d.ts +12 -0
  360. package/dist/SafeArea/safe-area.js +15 -0
  361. package/dist/SafeArea/style.scss +17 -0
  362. package/dist/Scaffold/demo/base.d.ts +3 -0
  363. package/dist/Scaffold/demo/base.js +30 -0
  364. package/dist/Scaffold/index.d.ts +3 -0
  365. package/dist/Scaffold/index.js +2 -0
  366. package/dist/Scaffold/scaffold.d.ts +8 -0
  367. package/dist/Scaffold/scaffold.js +19 -0
  368. package/dist/Scaffold/style.scss +16 -0
  369. package/dist/ScrollView/demo/base.d.ts +3 -0
  370. package/dist/ScrollView/demo/base.js +43 -0
  371. package/dist/ScrollView/index.d.ts +3 -0
  372. package/dist/ScrollView/index.js +2 -0
  373. package/dist/ScrollView/scroll-view.d.ts +24 -0
  374. package/dist/ScrollView/scroll-view.js +84 -0
  375. package/dist/ScrollView/style.scss +19 -0
  376. package/dist/SideBar/SideBarContext.d.ts +18 -0
  377. package/dist/SideBar/SideBarContext.js +2 -0
  378. package/dist/SideBar/demo/base.d.ts +3 -0
  379. package/dist/SideBar/demo/base.js +54 -0
  380. package/dist/SideBar/demo/default-active.d.ts +3 -0
  381. package/dist/SideBar/demo/default-active.js +34 -0
  382. package/dist/SideBar/demo/scroll-mode.d.ts +3 -0
  383. package/dist/SideBar/demo/scroll-mode.js +55 -0
  384. package/dist/SideBar/index.d.ts +3 -0
  385. package/dist/SideBar/index.js +2 -0
  386. package/dist/SideBar/side-bar.d.ts +25 -0
  387. package/dist/SideBar/side-bar.js +414 -0
  388. package/dist/SideBar/style.scss +86 -0
  389. package/dist/SideBar/types.d.ts +7 -0
  390. package/dist/SideBar/types.js +1 -0
  391. package/dist/Space/demo/base.d.ts +3 -0
  392. package/dist/Space/demo/base.js +120 -0
  393. package/dist/Space/index.d.ts +3 -0
  394. package/dist/Space/index.js +2 -0
  395. package/dist/Space/space.d.ts +38 -0
  396. package/dist/Space/space.js +61 -0
  397. package/dist/Space/style.scss +77 -0
  398. package/dist/SpinLoading/demo/base.d.ts +3 -0
  399. package/dist/SpinLoading/demo/base.js +21 -0
  400. package/dist/SpinLoading/index.d.ts +2 -0
  401. package/dist/SpinLoading/index.js +2 -0
  402. package/dist/SpinLoading/spin-loading.d.ts +10 -0
  403. package/dist/SpinLoading/spin-loading.js +59 -0
  404. package/dist/SpinLoading/spin-loading.scss +40 -0
  405. package/dist/Switch/demo/base.d.ts +3 -0
  406. package/dist/Switch/demo/base.js +104 -0
  407. package/dist/Switch/index.d.ts +3 -0
  408. package/dist/Switch/index.js +2 -0
  409. package/dist/Switch/spin-icon.d.ts +3 -0
  410. package/dist/Switch/spin-icon.js +23 -0
  411. package/dist/Switch/style.scss +113 -0
  412. package/dist/Switch/switch.d.ts +15 -0
  413. package/dist/Switch/switch.js +120 -0
  414. package/dist/TabBar/TabBarContext.d.ts +10 -0
  415. package/dist/TabBar/TabBarContext.js +2 -0
  416. package/dist/TabBar/demo/base.d.ts +6 -0
  417. package/dist/TabBar/demo/base.js +26 -0
  418. package/dist/TabBar/index.d.ts +6 -0
  419. package/dist/TabBar/index.js +3 -0
  420. package/dist/TabBar/index.scss +35 -0
  421. package/dist/TabBar/tab-bar.d.ts +59 -0
  422. package/dist/TabBar/tab-bar.js +83 -0
  423. package/dist/Tabs/context.d.ts +11 -0
  424. package/dist/Tabs/context.js +4 -0
  425. package/dist/Tabs/demo/base.d.ts +3 -0
  426. package/dist/Tabs/demo/base.js +59 -0
  427. package/dist/Tabs/index.d.ts +9 -0
  428. package/dist/Tabs/index.js +5 -0
  429. package/dist/Tabs/style.scss +107 -0
  430. package/dist/Tabs/tab-nav.d.ts +9 -0
  431. package/dist/Tabs/tab-nav.js +25 -0
  432. package/dist/Tabs/tab-pane.d.ts +7 -0
  433. package/dist/Tabs/tab-pane.js +17 -0
  434. package/dist/Tabs/tab.d.ts +7 -0
  435. package/dist/Tabs/tab.js +6 -0
  436. package/dist/Tabs/tabs.d.ts +25 -0
  437. package/dist/Tabs/tabs.js +156 -0
  438. package/dist/Tag/demo/base.d.ts +7 -0
  439. package/dist/Tag/demo/base.js +67 -0
  440. package/dist/Tag/demo/style.scss +8 -0
  441. package/dist/Tag/index.d.ts +3 -0
  442. package/dist/Tag/index.js +2 -0
  443. package/dist/Tag/style.scss +85 -0
  444. package/dist/Tag/tag.d.ts +30 -0
  445. package/dist/Tag/tag.js +44 -0
  446. package/dist/Toast/demo/base.d.ts +3 -0
  447. package/dist/Toast/demo/base.js +121 -0
  448. package/dist/Toast/demo/component-mode.d.ts +3 -0
  449. package/dist/Toast/demo/component-mode.js +32 -0
  450. package/dist/Toast/index.d.ts +8 -0
  451. package/dist/Toast/index.js +4 -0
  452. package/dist/Toast/style.scss +63 -0
  453. package/dist/Toast/toast-modal.d.ts +18 -0
  454. package/dist/Toast/toast-modal.js +112 -0
  455. package/dist/Toast/toast.d.ts +20 -0
  456. package/dist/Toast/toast.js +112 -0
  457. package/dist/VerificationCodeInput/demo/base.d.ts +3 -0
  458. package/dist/VerificationCodeInput/demo/base.js +11 -0
  459. package/dist/VerificationCodeInput/index.d.ts +2 -0
  460. package/dist/VerificationCodeInput/index.js +2 -0
  461. package/dist/VerificationCodeInput/style.scss +20 -0
  462. package/dist/VerificationCodeInput/verification-code-input.d.ts +25 -0
  463. package/dist/VerificationCodeInput/verification-code-input.js +99 -0
  464. package/dist/WaterMark/demo/demo1.d.ts +7 -0
  465. package/dist/WaterMark/demo/demo1.js +47 -0
  466. package/dist/WaterMark/demo/demo1.scss +6 -0
  467. package/dist/WaterMark/demo/demo2.d.ts +3 -0
  468. package/dist/WaterMark/demo/demo2.js +31 -0
  469. package/dist/WaterMark/index.d.ts +3 -0
  470. package/dist/WaterMark/index.js +2 -0
  471. package/dist/WaterMark/style.scss +17 -0
  472. package/dist/WaterMark/water-mark.d.ts +22 -0
  473. package/dist/WaterMark/water-mark.js +108 -0
  474. package/dist/index.d.ts +63 -0
  475. package/dist/index.js +46 -0
  476. package/dist/locales/base.d.ts +139 -0
  477. package/dist/locales/base.js +139 -0
  478. package/dist/locales/en-US.d.ts +139 -0
  479. package/dist/locales/en-US.js +4 -0
  480. package/dist/locales/zh-CN.d.ts +3 -0
  481. package/dist/locales/zh-CN.js +140 -0
  482. package/dist/style/index.d.ts +1 -0
  483. package/dist/style/index.js +5 -0
  484. package/dist/style/style.scss +52 -0
  485. package/dist/style/theme-dark.scss +24 -0
  486. package/dist/style/theme-default.scss +54 -0
  487. package/dist/style/variable.scss +167 -0
  488. package/dist/utils/attach-properties-to-component.d.ts +1 -0
  489. package/dist/utils/attach-properties-to-component.js +9 -0
  490. package/dist/utils/bound.d.ts +1 -0
  491. package/dist/utils/bound.js +10 -0
  492. package/dist/utils/can-use-dom.d.ts +1 -0
  493. package/dist/utils/can-use-dom.js +1 -0
  494. package/dist/utils/convert-px.d.ts +1 -0
  495. package/dist/utils/convert-px.js +27 -0
  496. package/dist/utils/dev-log.d.ts +3 -0
  497. package/dist/utils/dev-log.js +36 -0
  498. package/dist/utils/get-container.d.ts +2 -0
  499. package/dist/utils/get-container.js +4 -0
  500. package/dist/utils/get-scroll-parent.d.ts +3 -0
  501. package/dist/utils/get-scroll-parent.js +23 -0
  502. package/dist/utils/is-dev.d.ts +1 -0
  503. package/dist/utils/is-dev.js +1 -0
  504. package/dist/utils/lang.d.ts +1 -0
  505. package/dist/utils/lang.js +1 -0
  506. package/dist/utils/matrix.d.ts +10 -0
  507. package/dist/utils/matrix.js +37 -0
  508. package/dist/utils/merge-locale.d.ts +1 -0
  509. package/dist/utils/merge-locale.js +16 -0
  510. package/dist/utils/native-props.d.ts +10 -0
  511. package/dist/utils/native-props.js +39 -0
  512. package/dist/utils/reactNode.d.ts +7 -0
  513. package/dist/utils/reactNode.js +13 -0
  514. package/dist/utils/render-imperatively.d.ts +14 -0
  515. package/dist/utils/render-imperatively.js +105 -0
  516. package/dist/utils/render-to-body.d.ts +2 -0
  517. package/dist/utils/render-to-body.js +13 -0
  518. package/dist/utils/render-to-container.d.ts +3 -0
  519. package/dist/utils/render-to-container.js +10 -0
  520. package/dist/utils/render.d.ts +9 -0
  521. package/dist/utils/render.js +87 -0
  522. package/dist/utils/rubberband.d.ts +2 -0
  523. package/dist/utils/rubberband.js +11 -0
  524. package/dist/utils/should-render.d.ts +10 -0
  525. package/dist/utils/should-render.js +12 -0
  526. package/dist/utils/supports-passive.d.ts +1 -0
  527. package/dist/utils/supports-passive.js +13 -0
  528. package/dist/utils/taro-utils.d.ts +1 -0
  529. package/dist/utils/taro-utils.js +6 -0
  530. package/dist/utils/to-css-length.d.ts +1 -0
  531. package/dist/utils/to-css-length.js +3 -0
  532. package/dist/utils/type.d.ts +65 -0
  533. package/dist/utils/type.js +48 -0
  534. package/dist/utils/use-initialized.d.ts +1 -0
  535. package/dist/utils/use-initialized.js +8 -0
  536. package/dist/utils/use-isomorphic-update-layout-effect.d.ts +2 -0
  537. package/dist/utils/use-isomorphic-update-layout-effect.js +2 -0
  538. package/dist/utils/use-lock-scroll.d.ts +2 -0
  539. package/dist/utils/use-lock-scroll.js +81 -0
  540. package/dist/utils/use-mutation-effect.d.ts +3 -0
  541. package/dist/utils/use-mutation-effect.js +26 -0
  542. package/dist/utils/use-props-value.d.ts +8 -0
  543. package/dist/utils/use-props-value.js +22 -0
  544. package/dist/utils/use-resize-effect.d.ts +2 -0
  545. package/dist/utils/use-resize-effect.js +23 -0
  546. package/dist/utils/use-touch.d.ts +17 -0
  547. package/dist/utils/use-touch.js +63 -0
  548. package/dist/utils/validate.d.ts +1 -0
  549. package/dist/utils/validate.js +4 -0
  550. package/dist/utils/with-default-props.d.ts +9 -0
  551. package/dist/utils/with-default-props.js +33 -0
  552. package/dist/utils/with-stop-propagation.d.ts +4 -0
  553. package/dist/utils/with-stop-propagation.js +38 -0
  554. package/dist/utils/zIndex.d.ts +1 -0
  555. package/dist/utils/zIndex.js +4 -0
  556. package/dist/utils/zindexContext.d.ts +3 -0
  557. package/dist/utils/zindexContext.js +6 -0
  558. package/package.json +106 -0
  559. package/readme.md +43 -0
@@ -0,0 +1,76 @@
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 { DemoBlock } from "../../DemoBlock";
8
+ import React from "react";
9
+ import Form from "../index";
10
+ import Input from "../../Input";
11
+ import Button from "../../Button";
12
+ export default (function () {
13
+ var _Form$useForm = Form.useForm(),
14
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
15
+ verticalForm = _Form$useForm2[0];
16
+ var _Form$useForm3 = Form.useForm(),
17
+ _Form$useForm4 = _slicedToArray(_Form$useForm3, 1),
18
+ horizontalForm = _Form$useForm4[0];
19
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(DemoBlock, {
20
+ title: "\u6C34\u5E73\u8868\u5355"
21
+ }, /*#__PURE__*/React.createElement(Form, {
22
+ form: verticalForm,
23
+ labelWidth: 80
24
+ }, /*#__PURE__*/React.createElement(Form.Item, {
25
+ label: '姓名',
26
+ name: 'name',
27
+ required: true,
28
+ rules: [{
29
+ required: true,
30
+ message: '请输入姓名'
31
+ }]
32
+ }, /*#__PURE__*/React.createElement(Input, {
33
+ placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D"
34
+ })), /*#__PURE__*/React.createElement(Form.Item, {
35
+ label: '地址',
36
+ name: 'address',
37
+ required: true,
38
+ rules: [{
39
+ required: true,
40
+ message: '请输入地址'
41
+ }]
42
+ }, /*#__PURE__*/React.createElement(Input, {
43
+ placeholder: "\u8BF7\u8F93\u5165\u5730\u5740"
44
+ }))), /*#__PURE__*/React.createElement(Button, {
45
+ type: "primary",
46
+ block: true,
47
+ onClick: function onClick() {
48
+ verticalForm.validateFields().then(function (values) {
49
+ console.log(values);
50
+ });
51
+ }
52
+ }, "\u63D0\u4EA4")), /*#__PURE__*/React.createElement(DemoBlock, {
53
+ title: "\u5782\u76F4\u8868\u5355"
54
+ }, /*#__PURE__*/React.createElement(Form, {
55
+ layout: "vertical",
56
+ form: horizontalForm
57
+ }, /*#__PURE__*/React.createElement(Form.Item, {
58
+ label: '姓名',
59
+ name: 'name'
60
+ }, /*#__PURE__*/React.createElement(Input, {
61
+ placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D"
62
+ })), /*#__PURE__*/React.createElement(Form.Item, {
63
+ label: '地址',
64
+ name: 'address'
65
+ }, /*#__PURE__*/React.createElement(Input, {
66
+ placeholder: "\u8BF7\u8F93\u5165\u5730\u5740"
67
+ }))), /*#__PURE__*/React.createElement(Button, {
68
+ type: "primary",
69
+ block: true,
70
+ onClick: function onClick() {
71
+ horizontalForm.validateFields().then(function (values) {
72
+ console.log(values);
73
+ });
74
+ }
75
+ }, "\u63D0\u4EA4")));
76
+ });
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+ import { useWatch } from "rc-field-form";
3
+ import type { FormProps as RcFormProps } from 'rc-field-form/lib/Form';
4
+ import type { FormRef } from 'rc-field-form/lib/interface';
5
+ import { FormInstance } from "./interface";
6
+ import "./style.scss";
7
+ export type RequiredMark = boolean | 'optional' | ((labelNode: React.ReactNode, info: {
8
+ required: boolean;
9
+ }) => React.ReactNode);
10
+ export type FormLayout = 'horizontal' | 'inline' | 'vertical';
11
+ export type FormItemLayout = 'horizontal' | 'vertical';
12
+ export type FormLayoutAlign = 'left' | 'right';
13
+ export interface FormProps<Values = any> extends Omit<RcFormProps<Values>, 'form' | 'component'> {
14
+ /**
15
+ * @description 配置 Form.Item 的 colon 的默认值。表示是否显示 label 后面的冒号 (只有在属性 layout 为 horizontal 时有效)
16
+ * @default true
17
+ */
18
+ colon?: boolean;
19
+ /**
20
+ * @description 布局
21
+ * @default horizontal
22
+ */
23
+ layout?: FormLayout;
24
+ /**
25
+ * @description 经 Form.useForm() 创建的 form 控制实例,不提供时会自动创建
26
+ * @default
27
+ */
28
+ form?: FormInstance<Values>;
29
+ /**
30
+ * @description 标签
31
+ * @default horizontal
32
+ */
33
+ labelAlign?: FormLayoutAlign;
34
+ labelWidth?: number;
35
+ requiredMark?: RequiredMark;
36
+ }
37
+ export declare const InternalForm: React.ForwardRefRenderFunction<FormRef, FormProps>;
38
+ export { useWatch };
39
+ export default InternalForm;
@@ -0,0 +1,28 @@
1
+ var _excluded = ["children", "layout", "labelAlign", "labelWidth", "requiredMark"];
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 _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; }
4
+ 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; }
5
+ import React from "react";
6
+ import FieldForm, { useWatch } from "rc-field-form";
7
+ import { FormContext } from "./context";
8
+ import "./style.scss";
9
+ export var InternalForm = function InternalForm(_ref, ref) {
10
+ var children = _ref.children,
11
+ layout = _ref.layout,
12
+ labelAlign = _ref.labelAlign,
13
+ labelWidth = _ref.labelWidth,
14
+ requiredMark = _ref.requiredMark,
15
+ props = _objectWithoutProperties(_ref, _excluded);
16
+ return /*#__PURE__*/React.createElement(FormContext.Provider, {
17
+ value: {
18
+ layout: layout || 'horizontal',
19
+ labelAlign: labelAlign || 'left',
20
+ labelWidth: labelWidth,
21
+ requiredMark: requiredMark || true
22
+ }
23
+ }, /*#__PURE__*/React.createElement(FieldForm, _extends({}, props, {
24
+ component: false
25
+ }), children));
26
+ };
27
+ export { useWatch };
28
+ export default InternalForm;
@@ -0,0 +1,2 @@
1
+ import { FormInstance } from '../interface';
2
+ export default function useForm<Values = any>(form?: FormInstance<Values>): [FormInstance<Values>];
@@ -0,0 +1,24 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ 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."); }
9
+ 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); }
10
+ 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; }
11
+ 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; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import * as React from 'react';
14
+ import { useForm as useRcForm } from 'rc-field-form';
15
+ export default function useForm(form) {
16
+ var _useRcForm = useRcForm(),
17
+ _useRcForm2 = _slicedToArray(_useRcForm, 1),
18
+ rcForm = _useRcForm2[0];
19
+ var itemsRef = React.useRef({});
20
+ var wrapForm = React.useMemo(function () {
21
+ return form !== null && form !== void 0 ? form : _objectSpread({}, rcForm);
22
+ }, [form, rcForm]);
23
+ return [wrapForm];
24
+ }
@@ -0,0 +1,2 @@
1
+ import { FormContextProps } from "../context";
2
+ export declare function useFormContext(): FormContextProps;
@@ -0,0 +1,6 @@
1
+ import { FormContext } from "../context";
2
+ import React from "react";
3
+ export function useFormContext() {
4
+ var formContext = React.useContext(FormContext);
5
+ return formContext;
6
+ }
@@ -0,0 +1,12 @@
1
+ import InternalForm, { FormProps, useWatch } from "./form";
2
+ import FormItem, { FormItemProps } from "./FormItem";
3
+ import useForm from "./hooks/useForm";
4
+ type InternalFormType = typeof InternalForm;
5
+ type CompoundedComponent = InternalFormType & {
6
+ useForm: typeof useForm;
7
+ Item: typeof FormItem;
8
+ useWatch: typeof useWatch;
9
+ };
10
+ declare const Form: CompoundedComponent;
11
+ export type { FormProps, FormItemProps };
12
+ export default Form;
@@ -0,0 +1,8 @@
1
+ import InternalForm, { useWatch } from "./form";
2
+ import FormItem from "./FormItem";
3
+ import useForm from "./hooks/useForm";
4
+ var Form = InternalForm;
5
+ Form.useForm = useForm;
6
+ Form.Item = FormItem;
7
+ Form.useWatch = useWatch;
8
+ export default Form;
@@ -0,0 +1,3 @@
1
+ import type { FormInstance as RcFormInstance } from 'rc-field-form';
2
+ export interface FormInstance<Values = any> extends RcFormInstance<Values> {
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,42 @@
1
+ $cls-prefix-form: 'triones-antm-form';
2
+ $cls-prefix-form-item: 'triones-antm-form-item';
3
+
4
+ .#{$cls-prefix-form}{
5
+
6
+ }
7
+
8
+ .#{$cls-prefix-form-item}{
9
+ &-label{
10
+ font-size: 14Px;
11
+ //line-height: 1.5;
12
+ color: #6F6F6F;
13
+ &-left{}
14
+ &-right{
15
+ text-align: right;
16
+ }
17
+ &-required-mark{
18
+ display: inline-block;
19
+ color: red;
20
+ margin-right: 4Px;
21
+ }
22
+ }
23
+ &-input{
24
+ .#{$cls-prefix-form-item}{
25
+ &-error{
26
+ font-size: 12Px;
27
+ color: red;
28
+ }
29
+ }
30
+ }
31
+ &-horizontal{
32
+ display: flex;
33
+ .#{$cls-prefix-form-item}{
34
+ &-label{
35
+ padding: 4Px;
36
+ }
37
+ &-input{
38
+ flex: auto 1;
39
+ }
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * compact: true
3
+ */
4
+ import React from 'react';
5
+ import './base.scss';
6
+ declare const _default: () => React.JSX.Element;
7
+ export default _default;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * compact: true
3
+ */
4
+ import React from 'react';
5
+ import { DemoBlock } from "../../DemoBlock";
6
+ import "./base.scss";
7
+ import Grid from "../index";
8
+ export default (function () {
9
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
10
+ title: "\u57FA\u7840\u7528\u6CD5"
11
+ }, /*#__PURE__*/React.createElement(Grid, {
12
+ columns: 3,
13
+ gap: 8
14
+ }, /*#__PURE__*/React.createElement(Grid.Item, null, /*#__PURE__*/React.createElement("div", {
15
+ className: "grid-demo-item-block"
16
+ }, "A")), /*#__PURE__*/React.createElement(Grid.Item, null, /*#__PURE__*/React.createElement("div", {
17
+ className: "grid-demo-item-block"
18
+ }, "B")), /*#__PURE__*/React.createElement(Grid.Item, null, /*#__PURE__*/React.createElement("div", {
19
+ className: "grid-demo-item-block"
20
+ }, "C")), /*#__PURE__*/React.createElement(Grid.Item, null, /*#__PURE__*/React.createElement("div", {
21
+ className: "grid-demo-item-block"
22
+ }, "D")), /*#__PURE__*/React.createElement(Grid.Item, null, /*#__PURE__*/React.createElement("div", {
23
+ className: "grid-demo-item-block"
24
+ }, "E")))), /*#__PURE__*/React.createElement(DemoBlock, {
25
+ title: "\u63A7\u5236\u683C\u5B50\u7684\u8DE8\u5EA6"
26
+ }, /*#__PURE__*/React.createElement(Grid, {
27
+ columns: 3,
28
+ gap: 8
29
+ }, /*#__PURE__*/React.createElement(Grid.Item, null, /*#__PURE__*/React.createElement("div", {
30
+ className: "grid-demo-item-block"
31
+ }, "A")), /*#__PURE__*/React.createElement(Grid.Item, {
32
+ span: 2
33
+ }, /*#__PURE__*/React.createElement("div", {
34
+ className: "grid-demo-item-block"
35
+ }, "B")), /*#__PURE__*/React.createElement(Grid.Item, {
36
+ span: 2
37
+ }, /*#__PURE__*/React.createElement("div", {
38
+ className: "grid-demo-item-block"
39
+ }, "C")), /*#__PURE__*/React.createElement(Grid.Item, null, /*#__PURE__*/React.createElement("div", {
40
+ className: "grid-demo-item-block"
41
+ }, "D")), /*#__PURE__*/React.createElement(Grid.Item, {
42
+ span: 3
43
+ }, /*#__PURE__*/React.createElement("div", {
44
+ className: "grid-demo-item-block"
45
+ }, "E")))));
46
+ });
@@ -0,0 +1,7 @@
1
+ .grid-demo-item-block {
2
+ border: solid 1px #999;
3
+ background: #f5f5f5;
4
+ text-align: center;
5
+ color: #999;
6
+ height: 100%;
7
+ }
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { FC, ReactNode } from 'react';
3
+ import { NativeProps } from '../utils/native-props';
4
+ import './style.scss';
5
+ export type GridProps = {
6
+ columns: number;
7
+ gap?: number | string | [number | string, number | string];
8
+ children?: ReactNode;
9
+ } & NativeProps<'--gap' | '--gap-vertical' | '--gap-horizontal'>;
10
+ export declare const Grid: FC<GridProps>;
11
+ export type GridItemProps = {
12
+ span?: number;
13
+ onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
14
+ children?: ReactNode;
15
+ } & NativeProps;
16
+ export declare const GridItem: FC<GridItemProps>;
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import { toCSSLength, withNativeProps } from "../utils/native-props";
3
+ import "./style.scss";
4
+ import { mergeProps } from "../utils/with-default-props";
5
+ var classPrefix = "triones-antm-grid";
6
+ export var Grid = function Grid(props) {
7
+ var style = {
8
+ '--columns': props.columns.toString()
9
+ };
10
+ var gap = props.gap;
11
+ if (gap !== undefined) {
12
+ if (Array.isArray(gap)) {
13
+ style['--gap-horizontal'] = toCSSLength(gap[0]);
14
+ style['--gap-vertical'] = toCSSLength(gap[1]);
15
+ } else {
16
+ style['--gap'] = toCSSLength(gap);
17
+ }
18
+ }
19
+ return withNativeProps(props, /*#__PURE__*/React.createElement("div", {
20
+ className: classPrefix,
21
+ style: style
22
+ }, props.children));
23
+ };
24
+ export var GridItem = function GridItem(p) {
25
+ var props = mergeProps({
26
+ span: 1
27
+ }, p);
28
+ var itemStyle = {
29
+ '--item-span': props.span
30
+ };
31
+ return withNativeProps(props, /*#__PURE__*/React.createElement("div", {
32
+ className: "".concat(classPrefix, "-item"),
33
+ style: itemStyle,
34
+ onClick: props.onClick
35
+ }, props.children));
36
+ };
@@ -0,0 +1,7 @@
1
+ import { Grid as InternalGrid, GridItem } from './grid';
2
+ export type { GridProps, GridItemProps } from './grid';
3
+ type CompoundedComponent = typeof InternalGrid & {
4
+ Item: typeof GridItem;
5
+ };
6
+ declare const Grid: CompoundedComponent;
7
+ export default Grid;
@@ -0,0 +1,4 @@
1
+ import { Grid as InternalGrid, GridItem } from "./grid";
2
+ var Grid = InternalGrid;
3
+ Grid.Item = GridItem;
4
+ export default Grid;
@@ -0,0 +1,17 @@
1
+ $class-prefix-grid: 'triones-antm-grid';
2
+ /* prettier-ignore */
3
+ .#{$class-prefix-grid} {
4
+ --gap: 0;
5
+ --gap-horizontal: var(--gap);
6
+ --gap-vertical: var(--gap);
7
+
8
+ display: grid;
9
+ grid-gap: 10PX;
10
+ column-gap: var(--gap-horizontal);
11
+ row-gap: var(--gap-vertical);
12
+ grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
13
+ align-items: stretch;
14
+ &-item {
15
+ grid-column-end: span var(--item-span);
16
+ }
17
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { NativeProps } from '../utils/native-props';
3
+ export declare const CheckIcon: React.NamedExoticComponent<NativeProps>;
@@ -0,0 +1,10 @@
1
+ import React, { memo } from 'react';
2
+ import { withNativeProps } from "../utils/native-props";
3
+ export var CheckIcon = /*#__PURE__*/memo(function (props) {
4
+ return withNativeProps(props, /*#__PURE__*/React.createElement("svg", {
5
+ viewBox: "0 0 40 40"
6
+ }, /*#__PURE__*/React.createElement("path", {
7
+ d: "M31.5541766,15 L28.0892433,15 L28.0892434,15 C27.971052,15 27.8576674,15.044522 27.7740471,15.1239792 L18.2724722,24.1625319 L13.2248725,19.3630279 L13.2248725,19.3630279 C13.1417074,19.2834412 13.0287551,19.2384807 12.9107898,19.2380079 L9.44474455,19.2380079 L9.44474454,19.2380079 C9.19869815,19.2384085 8.99957935,19.4284738 9,19.66253 C9,19.7747587 9.04719253,19.8823283 9.13066188,19.9616418 L17.0907466,27.5338228 C17.4170809,27.8442545 17.8447695,28 18.2713393,28 L18.2980697,28 C18.7168464,27.993643 19.133396,27.8378975 19.4530492,27.5338228 L31.8693384,15.7236361 L31.8693384,15.7236361 C32.0434167,15.5582251 32.0435739,15.2898919 31.8696892,15.1242941 C31.7860402,15.0446329 31.6725052,15 31.5541421,15 L31.5541766,15 Z",
8
+ fill: "currentColor"
9
+ })));
10
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * compact: true
3
+ */
4
+ import React from "react";
5
+ declare const _default: () => React.JSX.Element;
6
+ export default _default;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * compact: true
3
+ */
4
+ import React from "react";
5
+ import * as icons from "@trionesdev/antd-taro-icons-react";
6
+ import _ from "lodash";
7
+ import { DemoBlock } from "../../DemoBlock";
8
+ export default (function () {
9
+ return /*#__PURE__*/React.createElement(DemoBlock, {
10
+ title: "\u56FE\u6807"
11
+ }, /*#__PURE__*/React.createElement("div", {
12
+ style: {
13
+ display: 'flex',
14
+ alignItems: 'center',
15
+ justifyContent: 'space-between',
16
+ gap: 20,
17
+ flexWrap: 'wrap'
18
+ }
19
+ }, _.map(_.omit(icons, 'Icon'), function (icon, name) {
20
+ return /*#__PURE__*/React.createElement("div", {
21
+ key: name,
22
+ style: {
23
+ width: '40%',
24
+ display: 'flex',
25
+ flexDirection: 'column',
26
+ alignItems: 'center',
27
+ marginTop: 30
28
+ }
29
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(icon, {
30
+ key: name,
31
+ style: {
32
+ fontSize: 48
33
+ }
34
+ })), /*#__PURE__*/React.createElement("div", {
35
+ style: {
36
+ fontSize: 14,
37
+ marginTop: 5
38
+ }
39
+ }, name));
40
+ })));
41
+ });
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const BrokenImageIcon: () => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export var BrokenImageIcon = function BrokenImageIcon() {
3
+ return /*#__PURE__*/React.createElement("svg", {
4
+ viewBox: "0 0 48 48",
5
+ xmlns: "http://www.w3.org/2000/svg"
6
+ }, /*#__PURE__*/React.createElement("path", {
7
+ d: "M19.233 6.233 17.42 9.08l-10.817.001a.665.665 0 0 0-.647.562l-.007.096V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.415 2.415 0 0 1 1.807.625l.126.127 4.182 4.525 2.267-3.292 5.461 7.841-4.065 7.375H6.604c-1.86 0-3.382-1.47-3.482-3.317l-.005-.192V9.744c0-1.872 1.461-3.405 3.296-3.505l.19-.005h12.63Zm22.163 0c1.86 0 3.382 1.472 3.482 3.314l.005.192v29.14a3.507 3.507 0 0 1-3.3 3.505l-.191.006H27.789l3.63-6.587.06-.119a1.87 1.87 0 0 0-.163-1.853l-6.928-9.949 3.047-4.422a2.374 2.374 0 0 1 1.96-1.01 2.4 2.4 0 0 1 1.86.87l.106.14L42.05 34.89V9.74a.664.664 0 0 0-.654-.658H21.855l1.812-2.848h17.73Zm-28.305 5.611c.794 0 1.52.298 2.07.788l-.843 1.325-.067.114a1.87 1.87 0 0 0 .11 1.959l.848 1.217c-.556.515-1.3.83-2.118.83a3.122 3.122 0 0 1-3.117-3.116 3.119 3.119 0 0 1 3.117-3.117Z",
8
+ fill: "#DBDBDB",
9
+ fillRule: "nonzero"
10
+ }));
11
+ };
@@ -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,101 @@
1
+ /**
2
+ * compact: true
3
+ */
4
+ import { DemoBlock } from "../../DemoBlock";
5
+ import React from 'react';
6
+ import "./base.scss";
7
+ import Space from "../../Space";
8
+ import Image from "../index";
9
+ var demoSrc = 'https://images.unsplash.com/photo-1567945716310-4745a6b7844b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=60';
10
+ var demoSrc2 = 'https://images.unsplash.com/photo-1620476214170-1d8080f65cdb?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=3150&q=80';
11
+ export default (function () {
12
+ return /*#__PURE__*/React.createElement("div", {
13
+ style: {
14
+ userSelect: 'none'
15
+ }
16
+ }, /*#__PURE__*/React.createElement(DemoBlock, {
17
+ title: "\u57FA\u7840\u7528\u6CD5"
18
+ }, /*#__PURE__*/React.createElement(Image, {
19
+ src: demoSrc
20
+ })), /*#__PURE__*/React.createElement(DemoBlock, {
21
+ title: "\u591A\u79CD\u586B\u5145\u6A21\u5F0F"
22
+ }, /*#__PURE__*/React.createElement(Space, {
23
+ wrap: true
24
+ }, /*#__PURE__*/React.createElement(Image, {
25
+ src: demoSrc,
26
+ width: 100,
27
+ height: 100,
28
+ fit: "fill"
29
+ }), /*#__PURE__*/React.createElement(Image, {
30
+ src: demoSrc,
31
+ width: 100,
32
+ height: 100,
33
+ fit: "contain"
34
+ }), /*#__PURE__*/React.createElement(Image, {
35
+ src: demoSrc,
36
+ width: 100,
37
+ height: 100,
38
+ fit: "cover"
39
+ }), /*#__PURE__*/React.createElement(Image, {
40
+ src: demoSrc,
41
+ width: 100,
42
+ height: 100,
43
+ fit: "scale-down"
44
+ }), /*#__PURE__*/React.createElement(Image, {
45
+ src: demoSrc,
46
+ width: 100,
47
+ height: 100,
48
+ fit: "none"
49
+ }))), /*#__PURE__*/React.createElement(DemoBlock, {
50
+ title: "\u81EA\u5B9A\u4E49\u5706\u89D2"
51
+ }, /*#__PURE__*/React.createElement(Space, {
52
+ wrap: true
53
+ }, /*#__PURE__*/React.createElement(Image, {
54
+ src: demoSrc,
55
+ width: 64,
56
+ height: 64,
57
+ fit: "cover",
58
+ style: {
59
+ borderRadius: 4
60
+ }
61
+ }), /*#__PURE__*/React.createElement(Image, {
62
+ src: demoSrc,
63
+ width: 64,
64
+ height: 64,
65
+ fit: "cover",
66
+ style: {
67
+ borderRadius: 8
68
+ }
69
+ }), /*#__PURE__*/React.createElement(Image, {
70
+ src: demoSrc,
71
+ width: 64,
72
+ height: 64,
73
+ fit: "cover",
74
+ style: {
75
+ borderRadius: 32
76
+ }
77
+ }))), /*#__PURE__*/React.createElement(DemoBlock, {
78
+ title: "\u901A\u8FC7 CSS \u53D8\u91CF\u7EDF\u4E00\u8BBE\u7F6E\u56FE\u7247\u5927\u5C0F"
79
+ }, /*#__PURE__*/React.createElement("div", {
80
+ className: "imagesContainer"
81
+ }, /*#__PURE__*/React.createElement(Space, {
82
+ wrap: true
83
+ }, /*#__PURE__*/React.createElement(Image, {
84
+ src: demoSrc
85
+ }), /*#__PURE__*/React.createElement(Image, {
86
+ src: demoSrc
87
+ }), /*#__PURE__*/React.createElement(Image, {
88
+ src: demoSrc
89
+ })))), /*#__PURE__*/React.createElement(DemoBlock, {
90
+ title: "\u52A0\u8F7D\u5931\u8D25"
91
+ }, /*#__PURE__*/React.createElement(Image, {
92
+ src: "/404",
93
+ width: 100,
94
+ height: 100
95
+ })), /*#__PURE__*/React.createElement(DemoBlock, {
96
+ title: "\u61D2\u52A0\u8F7D"
97
+ }, /*#__PURE__*/React.createElement(Image, {
98
+ lazy: true,
99
+ src: demoSrc2
100
+ })));
101
+ });
@@ -0,0 +1,4 @@
1
+ .imagesContainer {
2
+ --triones-antm-image-width: 90px;
3
+ --triones-antm-image-height: 60px;
4
+ }
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ImageIcon: () => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export var ImageIcon = function ImageIcon() {
3
+ return /*#__PURE__*/React.createElement("svg", {
4
+ viewBox: "0 0 48 48",
5
+ xmlns: "http://www.w3.org/2000/svg"
6
+ }, /*#__PURE__*/React.createElement("path", {
7
+ d: "M41.396 6.234c1.923 0 3.487 1.574 3.487 3.505v29.14c0 1.937-1.568 3.51-3.491 3.51H6.604c-1.923 0-3.487-1.573-3.487-3.51V9.745c0-1.936 1.564-3.51 3.487-3.51Zm0 2.847H6.604c-.355 0-.654.3-.654.658V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.405 2.405 0 0 1 1.933.752l4.182 4.525 7.58-11.005a2.374 2.374 0 0 1 1.96-1.01c.79 0 1.532.38 1.966 1.01L42.05 34.89V9.74a.664.664 0 0 0-.654-.658Zm-28.305 2.763a3.119 3.119 0 0 1 3.117 3.117 3.119 3.119 0 0 1-3.117 3.117 3.122 3.122 0 0 1-3.117-3.117 3.119 3.119 0 0 1 3.117-3.117Z",
8
+ fill: "#DBDBDB",
9
+ fillRule: "nonzero"
10
+ }));
11
+ };
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+ import React from 'react';
3
+ import { NativeProps } from '../utils/native-props';
4
+ export type ImageProps = {
5
+ src?: string;
6
+ alt?: string;
7
+ width?: number | string;
8
+ height?: number | string;
9
+ fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
10
+ placeholder?: ReactNode;
11
+ fallback?: ReactNode;
12
+ lazy?: boolean;
13
+ draggable?: boolean;
14
+ onClick?: (event: React.MouseEvent<HTMLImageElement, Event>) => void;
15
+ onError?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
16
+ onLoad?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
17
+ onContainerClick?: (event: React.MouseEvent<HTMLDivElement, Event>) => void;
18
+ } & NativeProps<'--width' | '--height'> & Pick<React.ImgHTMLAttributes<HTMLImageElement>, 'crossOrigin' | 'decoding' | 'loading' | 'referrerPolicy' | 'sizes' | 'srcSet' | 'useMap' | 'id'>;
19
+ export declare const Image: React.FC<ImageProps>;