@aloudata/aloudata-design 0.1.0-beta1 → 0.2.0-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 (414) hide show
  1. package/README.md +22 -13
  2. package/es/Button/demo/Icon/index.d.ts +3 -0
  3. package/es/Button/demo/Icon/index.js +67 -0
  4. package/{src → es}/Button/demo/Icon/index.less +0 -0
  5. package/es/Button/demo/basic/index.d.ts +4 -0
  6. package/es/Button/demo/basic/index.js +57 -0
  7. package/{src → es}/Button/demo/basic/index.less +0 -1
  8. package/es/Button/demo/disable/index.d.ts +3 -0
  9. package/es/Button/demo/disable/index.js +23 -0
  10. package/{src → es}/Button/demo/disable/index.less +0 -0
  11. package/es/Button/demo/href/index.d.ts +2 -0
  12. package/es/Button/demo/href/index.js +17 -0
  13. package/es/Button/demo/loading/index.d.ts +3 -0
  14. package/es/Button/demo/loading/index.js +37 -0
  15. package/{src → es}/Button/demo/loading/index.less +0 -0
  16. package/es/Button/index.d.ts +50 -0
  17. package/es/Button/index.js +108 -0
  18. package/es/Button/style/index.d.ts +2 -0
  19. package/es/Button/style/index.js +2 -0
  20. package/{src → es}/Button/style/index.less +5 -5
  21. package/es/Dropdown/Button.d.ts +69 -0
  22. package/es/Dropdown/Button.js +39 -0
  23. package/es/Dropdown/demo/basic/index.d.ts +4 -0
  24. package/es/Dropdown/demo/basic/index.js +18 -0
  25. package/es/Dropdown/demo/button/index.d.ts +3 -0
  26. package/es/Dropdown/demo/button/index.js +159 -0
  27. package/{src → es}/Dropdown/demo/button/index.less +0 -0
  28. package/es/Dropdown/demo/placement/index.d.ts +2 -0
  29. package/es/Dropdown/demo/placement/index.js +40 -0
  30. package/es/Dropdown/demo/subMenu/index.d.ts +2 -0
  31. package/es/Dropdown/demo/subMenu/index.js +42 -0
  32. package/es/Dropdown/demo/trigger/index.d.ts +2 -0
  33. package/es/Dropdown/demo/trigger/index.js +17 -0
  34. package/es/Dropdown/index.d.ts +59 -0
  35. package/es/Dropdown/index.js +33 -0
  36. package/es/Dropdown/style/index.d.ts +2 -0
  37. package/es/Dropdown/style/index.js +2 -0
  38. package/{src → es}/Dropdown/style/index.less +0 -0
  39. package/es/Empty/index.d.ts +8 -0
  40. package/es/Empty/index.js +57 -0
  41. package/es/Empty/style/index.d.ts +1 -0
  42. package/es/Empty/style/index.js +1 -0
  43. package/es/Empty/style/index.less +23 -0
  44. package/{src → es}/Icon/iconfont/demo.css +0 -0
  45. package/{src → es}/Icon/iconfont/demo_index.html +95 -3
  46. package/es/Icon/iconfont/iconfont.css +109 -0
  47. package/es/Icon/iconfont/iconfont.js +46 -0
  48. package/{src → es}/Icon/iconfont/iconfont.json +28 -0
  49. package/es/Icon/iconfont/iconfont.ttf +0 -0
  50. package/es/Icon/iconfont/iconfont.woff +0 -0
  51. package/es/Icon/iconfont/iconfont.woff2 +0 -0
  52. package/es/Icon/index.d.ts +11 -0
  53. package/es/Icon/index.js +42 -0
  54. package/{src → es}/Icon/index.less +3 -3
  55. package/es/Input/components/Group/index.d.ts +14 -0
  56. package/es/Input/components/Group/index.js +12 -0
  57. package/es/Input/components/Password/index.d.ts +10 -0
  58. package/es/Input/components/Password/index.js +20 -0
  59. package/es/Input/components/TextArea/index.d.ts +52 -0
  60. package/es/Input/components/TextArea/index.js +14 -0
  61. package/es/Input/demo/allowClear/index.d.ts +3 -0
  62. package/es/Input/demo/allowClear/index.js +11 -0
  63. package/{src → es}/Input/demo/allowClear/index.less +0 -0
  64. package/es/Input/demo/basic/index.d.ts +4 -0
  65. package/es/Input/demo/basic/index.js +65 -0
  66. package/es/Input/demo/basic/index.less +14 -0
  67. package/es/Input/demo/gourp/index.d.ts +2 -0
  68. package/es/Input/demo/gourp/index.js +67 -0
  69. package/es/Input/demo/password/index.d.ts +3 -0
  70. package/es/Input/demo/password/index.js +21 -0
  71. package/{src → es}/Input/demo/password/index.less +0 -0
  72. package/es/Input/demo/prefix/index.d.ts +3 -0
  73. package/es/Input/demo/prefix/index.js +17 -0
  74. package/{src → es}/Input/demo/prefix/index.less +0 -0
  75. package/es/Input/demo/showCount/index.d.ts +3 -0
  76. package/es/Input/demo/showCount/index.js +17 -0
  77. package/{src → es}/Input/demo/showCount/index.less +0 -0
  78. package/es/Input/demo/textArea/autoSize.d.ts +2 -0
  79. package/es/Input/demo/textArea/autoSize.js +50 -0
  80. package/es/Input/index.d.ts +65 -0
  81. package/es/Input/index.js +46 -0
  82. package/es/Input/style/index.d.ts +2 -0
  83. package/es/Input/style/index.js +2 -0
  84. package/{src → es}/Input/style/index.less +4 -1
  85. package/es/Menu/Divider.d.ts +4 -0
  86. package/es/Menu/Divider.js +15 -0
  87. package/es/Menu/MenuItem.d.ts +17 -0
  88. package/es/Menu/MenuItem.js +15 -0
  89. package/es/Menu/SubMenu.d.ts +26 -0
  90. package/es/Menu/SubMenu.js +29 -0
  91. package/es/Menu/index.d.ts +20 -0
  92. package/es/Menu/index.js +31 -0
  93. package/es/Menu/style/index.d.ts +2 -0
  94. package/es/Menu/style/index.js +2 -0
  95. package/{src → es}/Menu/style/index.less +4 -0
  96. package/es/Navigator/components/Menu/index.d.ts +19 -0
  97. package/es/Navigator/components/Menu/index.js +187 -0
  98. package/es/Navigator/demo/basic/index.d.ts +4 -0
  99. package/es/Navigator/demo/basic/index.js +45 -0
  100. package/es/Navigator/demo/basic/index.less +3 -0
  101. package/es/Navigator/demo/example/index.d.ts +4 -0
  102. package/es/Navigator/demo/example/index.js +153 -0
  103. package/es/Navigator/demo/example/index.less +10 -0
  104. package/es/Navigator/demo/logo.png +0 -0
  105. package/es/Navigator/demo/menuWithFooter/index.d.ts +4 -0
  106. package/es/Navigator/demo/menuWithFooter/index.js +73 -0
  107. package/es/Navigator/demo/menuWithFooter/index.less +3 -0
  108. package/es/Navigator/demo/subMenu/index.d.ts +4 -0
  109. package/es/Navigator/demo/subMenu/index.js +71 -0
  110. package/es/Navigator/demo/subMenu/index.less +3 -0
  111. package/es/Navigator/index.d.ts +41 -0
  112. package/es/Navigator/index.js +45 -0
  113. package/es/Navigator/style/index.d.ts +2 -0
  114. package/es/Navigator/style/index.js +2 -0
  115. package/es/Navigator/style/index.less +228 -0
  116. package/es/Select/BaseSelect.d.ts +5 -0
  117. package/es/Select/BaseSelect.js +400 -0
  118. package/{src/Select/OptionsList/OptGroup.tsx → es/Select/OptionsList/OptGroup.d.ts} +2 -4
  119. package/es/Select/OptionsList/OptGroup.js +6 -0
  120. package/es/Select/OptionsList/OptionItem/RenderGroup.d.ts +9 -0
  121. package/es/Select/OptionsList/OptionItem/RenderGroup.js +16 -0
  122. package/es/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +8 -0
  123. package/es/Select/OptionsList/OptionItem/RenderLabelIcon.js +44 -0
  124. package/es/Select/OptionsList/OptionItem/RenderOption.d.ts +16 -0
  125. package/es/Select/OptionsList/OptionItem/RenderOption.js +79 -0
  126. package/es/Select/OptionsList/OptionItem/RenderTooltip.d.ts +8 -0
  127. package/es/Select/OptionsList/OptionItem/RenderTooltip.js +25 -0
  128. package/es/Select/OptionsList/OptionItem.d.ts +4 -0
  129. package/es/Select/OptionsList/OptionItem.js +4 -0
  130. package/es/Select/OptionsList/Options.d.ts +7 -0
  131. package/es/Select/OptionsList/Options.js +6 -0
  132. package/es/Select/OptionsList/index.d.ts +4 -0
  133. package/es/Select/OptionsList/index.js +187 -0
  134. package/es/Select/Selector/index.d.ts +4 -0
  135. package/es/Select/Selector/index.js +252 -0
  136. package/es/Select/VirtualList.d.ts +5 -0
  137. package/es/Select/VirtualList.js +29 -0
  138. package/es/Select/demo/disabled/index.d.ts +2 -0
  139. package/es/Select/demo/disabled/index.js +50 -0
  140. package/es/Select/demo/multiple/index.d.ts +2 -0
  141. package/es/Select/demo/multiple/index.js +140 -0
  142. package/es/Select/demo/options/index.d.ts +2 -0
  143. package/es/Select/demo/options/index.js +55 -0
  144. package/es/Select/demo/single/index.d.ts +3 -0
  145. package/es/Select/demo/single/index.js +89 -0
  146. package/es/Select/demo/single/index.less +5 -0
  147. package/es/Select/hooks/useCacheOption.d.ts +9 -0
  148. package/es/Select/hooks/useCacheOption.js +107 -0
  149. package/es/Select/index.d.ts +12 -0
  150. package/es/Select/index.js +9 -0
  151. package/es/Select/interface.d.ts +227 -0
  152. package/es/Select/interface.js +1 -0
  153. package/es/Select/style/index.d.ts +2 -0
  154. package/es/Select/style/index.js +2 -0
  155. package/{src → es}/Select/style/index.less +3 -10
  156. package/es/Select/utils.d.ts +21 -0
  157. package/es/Select/utils.js +193 -0
  158. package/es/Table/demo/basic/createData.d.ts +10 -0
  159. package/es/Table/demo/basic/createData.js +18 -0
  160. package/es/Table/demo/basic/index.d.ts +2 -0
  161. package/es/Table/demo/basic/index.js +64 -0
  162. package/es/Table/demo/editCell/index.d.ts +2 -0
  163. package/es/Table/demo/editCell/index.js +39 -0
  164. package/es/Table/demo/renderHeaderRight/index.d.ts +2 -0
  165. package/es/Table/demo/renderHeaderRight/index.js +37 -0
  166. package/es/Table/demo/resizeColumn/index.d.ts +2 -0
  167. package/es/Table/demo/resizeColumn/index.js +32 -0
  168. package/es/Table/demo/rowSelect/index.d.ts +2 -0
  169. package/es/Table/demo/rowSelect/index.js +35 -0
  170. package/es/Table/demo/sort/index.d.ts +2 -0
  171. package/es/Table/demo/sort/index.js +43 -0
  172. package/es/Table/demo/virtualList/index.d.ts +2 -0
  173. package/es/Table/demo/virtualList/index.js +88 -0
  174. package/es/Table/index.d.ts +5 -0
  175. package/es/Table/index.js +336 -0
  176. package/es/Table/interface.d.ts +34 -0
  177. package/es/Table/interface.js +1 -0
  178. package/es/Table/react-table-config.d.ts +122 -0
  179. package/es/Table/style/index.d.ts +2 -0
  180. package/es/Table/style/index.js +2 -0
  181. package/es/Table/style/index.less +141 -0
  182. package/es/Tabs/TabPane.d.ts +21 -0
  183. package/es/Tabs/TabPane.js +12 -0
  184. package/es/Tabs/demo/adaptHeight/index.d.ts +3 -0
  185. package/es/Tabs/demo/adaptHeight/index.js +19 -0
  186. package/{src → es}/Tabs/demo/adaptHeight/index.less +0 -0
  187. package/es/Tabs/demo/basic/index.d.ts +4 -0
  188. package/es/Tabs/demo/basic/index.js +44 -0
  189. package/{src → es}/Tabs/demo/basic/index.less +0 -0
  190. package/es/Tabs/demo/horizontalScroll/index.d.ts +3 -0
  191. package/es/Tabs/demo/horizontalScroll/index.js +30 -0
  192. package/{src → es}/Tabs/demo/horizontalScroll/index.less +0 -0
  193. package/es/Tabs/index.d.ts +41 -0
  194. package/es/Tabs/index.js +42 -0
  195. package/es/Tabs/style/index.d.ts +2 -0
  196. package/es/Tabs/style/index.js +2 -0
  197. package/{src → es}/Tabs/style/index.less +0 -0
  198. package/es/Tooltip/demo/basic/index.d.ts +2 -0
  199. package/es/Tooltip/demo/basic/index.js +7 -0
  200. package/es/Tooltip/demo/overflow/index.d.ts +2 -0
  201. package/es/Tooltip/demo/overflow/index.js +7 -0
  202. package/es/Tooltip/demo/placement/index.d.ts +6 -0
  203. package/es/Tooltip/demo/placement/index.js +70 -0
  204. package/{src → es}/Tooltip/demo/placement/index.less +0 -0
  205. package/es/Tooltip/demo/trigger/index.d.ts +3 -0
  206. package/es/Tooltip/demo/trigger/index.js +20 -0
  207. package/{src → es}/Tooltip/demo/trigger/index.less +0 -0
  208. package/es/Tooltip/index.d.ts +64 -0
  209. package/es/Tooltip/index.js +33 -0
  210. package/es/Tooltip/style/index.d.ts +2 -0
  211. package/es/Tooltip/style/index.js +2 -0
  212. package/{src → es}/Tooltip/style/index.less +0 -0
  213. package/es/_utils/hooks/useControlledState.d.ts +2 -0
  214. package/es/_utils/hooks/useControlledState.js +54 -0
  215. package/es/_utils/hooks/usePrefixCls.d.ts +2 -0
  216. package/es/_utils/hooks/usePrefixCls.js +14 -0
  217. package/es/index.d.ts +11 -0
  218. package/{src/index.ts → es/index.js} +3 -1
  219. package/es/style/index.d.ts +2 -0
  220. package/{src/style/index.ts → es/style/index.js} +0 -0
  221. package/{src → es}/style/index.less +0 -0
  222. package/{src → es}/style/mixins/index.less +0 -0
  223. package/{src → es}/style/themes/default/index.less +1 -1
  224. package/{lib/style/themes/default/themeColor.less → es/style/themes/default/themeColor.module.less} +0 -0
  225. package/es/style/themes/default/themeColor.module.less.d.ts +108 -0
  226. package/lib/Button/demo/basic/index.less +0 -1
  227. package/lib/Button/index.js +2 -2
  228. package/lib/Button/style/index.less +5 -5
  229. package/lib/Dropdown/demo/button/index.js +1 -1
  230. package/lib/Empty/index.d.ts +8 -0
  231. package/lib/Empty/index.js +71 -0
  232. package/lib/Empty/style/index.d.ts +1 -0
  233. package/lib/Empty/style/index.js +3 -0
  234. package/lib/Empty/style/index.less +23 -0
  235. package/lib/Icon/iconfont/demo_index.html +95 -3
  236. package/lib/Icon/iconfont/iconfont.css +19 -3
  237. package/lib/Icon/iconfont/iconfont.js +5 -5
  238. package/lib/Icon/iconfont/iconfont.json +28 -0
  239. package/lib/Icon/iconfont/iconfont.ttf +0 -0
  240. package/lib/Icon/iconfont/iconfont.woff +0 -0
  241. package/lib/Icon/iconfont/iconfont.woff2 +0 -0
  242. package/lib/Icon/index.less +3 -3
  243. package/lib/Input/components/Group/index.d.ts +0 -1
  244. package/lib/Input/components/Password/index.d.ts +3 -3
  245. package/lib/Input/components/Password/index.js +2 -2
  246. package/lib/Input/demo/basic/index.less +9 -1
  247. package/lib/Input/style/index.less +4 -1
  248. package/lib/Menu/Divider.d.ts +0 -1
  249. package/lib/Menu/style/index.less +4 -0
  250. package/lib/Navigator/components/Menu/index.d.ts +19 -0
  251. package/lib/Navigator/components/Menu/index.js +205 -0
  252. package/lib/Navigator/demo/basic/index.d.ts +4 -0
  253. package/lib/Navigator/demo/basic/index.js +62 -0
  254. package/lib/Navigator/demo/basic/index.less +3 -0
  255. package/lib/Navigator/demo/example/index.d.ts +4 -0
  256. package/lib/Navigator/demo/example/index.js +179 -0
  257. package/lib/Navigator/demo/example/index.less +10 -0
  258. package/lib/Navigator/demo/logo.png +0 -0
  259. package/lib/Navigator/demo/menuWithFooter/index.d.ts +4 -0
  260. package/lib/Navigator/demo/menuWithFooter/index.js +92 -0
  261. package/lib/Navigator/demo/menuWithFooter/index.less +3 -0
  262. package/lib/Navigator/demo/subMenu/index.d.ts +4 -0
  263. package/lib/Navigator/demo/subMenu/index.js +88 -0
  264. package/lib/Navigator/demo/subMenu/index.less +3 -0
  265. package/lib/Navigator/index.d.ts +41 -0
  266. package/lib/Navigator/index.js +64 -0
  267. package/lib/Navigator/style/index.d.ts +2 -0
  268. package/lib/Navigator/style/index.js +5 -0
  269. package/lib/Navigator/style/index.less +228 -0
  270. package/lib/Select/OptionsList/OptionItem/RenderGroup.d.ts +9 -0
  271. package/lib/Select/OptionsList/OptionItem/RenderGroup.js +27 -0
  272. package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +8 -0
  273. package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.js +58 -0
  274. package/lib/Select/OptionsList/OptionItem/RenderOption.d.ts +16 -0
  275. package/lib/Select/OptionsList/OptionItem/RenderOption.js +94 -0
  276. package/lib/Select/OptionsList/OptionItem/RenderTooltip.d.ts +8 -0
  277. package/lib/Select/OptionsList/OptionItem/RenderTooltip.js +37 -0
  278. package/lib/Select/OptionsList/OptionItem.d.ts +4 -35
  279. package/lib/Select/OptionsList/OptionItem.js +26 -172
  280. package/lib/Select/OptionsList/Options.d.ts +2 -2
  281. package/lib/Select/OptionsList/index.js +1 -1
  282. package/lib/Select/Selector/index.d.ts +2 -2
  283. package/lib/Select/Selector/index.js +13 -10
  284. package/lib/Select/demo/single/index.d.ts +1 -0
  285. package/lib/Select/demo/single/index.js +5 -1
  286. package/lib/Select/demo/single/index.less +5 -0
  287. package/lib/Select/interface.d.ts +8 -2
  288. package/lib/Select/style/index.less +3 -10
  289. package/lib/Table/demo/basic/createData.d.ts +10 -0
  290. package/lib/Table/demo/basic/createData.js +23 -0
  291. package/lib/Table/demo/basic/index.d.ts +2 -0
  292. package/lib/Table/demo/basic/index.js +80 -0
  293. package/lib/Table/demo/editCell/index.d.ts +2 -0
  294. package/lib/Table/demo/editCell/index.js +54 -0
  295. package/lib/Table/demo/renderHeaderRight/index.d.ts +2 -0
  296. package/lib/Table/demo/renderHeaderRight/index.js +52 -0
  297. package/lib/Table/demo/resizeColumn/index.d.ts +2 -0
  298. package/lib/Table/demo/resizeColumn/index.js +47 -0
  299. package/lib/Table/demo/rowSelect/index.d.ts +2 -0
  300. package/lib/Table/demo/rowSelect/index.js +50 -0
  301. package/lib/Table/demo/sort/index.d.ts +2 -0
  302. package/lib/Table/demo/sort/index.js +58 -0
  303. package/lib/Table/demo/virtualList/index.d.ts +2 -0
  304. package/lib/Table/demo/virtualList/index.js +103 -0
  305. package/lib/Table/index.d.ts +5 -0
  306. package/lib/Table/index.js +362 -0
  307. package/lib/Table/interface.d.ts +34 -0
  308. package/lib/Table/interface.js +5 -0
  309. package/lib/Table/react-table-config.d.ts +122 -0
  310. package/lib/Table/style/index.d.ts +2 -0
  311. package/lib/Table/style/index.js +5 -0
  312. package/lib/Table/style/index.less +141 -0
  313. package/lib/Tooltip/index.d.ts +1 -0
  314. package/lib/Tooltip/index.js +3 -1
  315. package/lib/index.d.ts +3 -0
  316. package/lib/index.js +16 -0
  317. package/lib/style/themes/default/index.less +1 -1
  318. package/{src/style/themes/default/themeColor.less → lib/style/themes/default/themeColor.module.less} +0 -0
  319. package/lib/style/themes/default/themeColor.module.less.d.ts +108 -0
  320. package/package.json +24 -8
  321. package/.editorconfig +0 -16
  322. package/.eslintrc.js +0 -43
  323. package/.fatherrc.ts +0 -16
  324. package/.prettierignore +0 -7
  325. package/.prettierrc.js +0 -1
  326. package/.stylelintrc.json +0 -36
  327. package/.umirc.ts +0 -15
  328. package/commitlint.config.js +0 -21
  329. package/docs/index.md +0 -21
  330. package/jest/setupTests.js +0 -1
  331. package/public/favicon.ico +0 -0
  332. package/src/Button/demo/Icon/index.tsx +0 -41
  333. package/src/Button/demo/basic/index.tsx +0 -26
  334. package/src/Button/demo/disable/index.tsx +0 -16
  335. package/src/Button/demo/href/index.tsx +0 -14
  336. package/src/Button/demo/loading/index.tsx +0 -21
  337. package/src/Button/index.md +0 -25
  338. package/src/Button/index.test.tsx +0 -58
  339. package/src/Button/index.tsx +0 -136
  340. package/src/Button/style/index.ts +0 -2
  341. package/src/Dropdown/Button.tsx +0 -93
  342. package/src/Dropdown/demo/basic/index.tsx +0 -20
  343. package/src/Dropdown/demo/button/index.tsx +0 -98
  344. package/src/Dropdown/demo/placement/index.tsx +0 -47
  345. package/src/Dropdown/demo/subMenu/index.tsx +0 -35
  346. package/src/Dropdown/demo/trigger/index.tsx +0 -19
  347. package/src/Dropdown/index.md +0 -35
  348. package/src/Dropdown/index.test.tsx +0 -185
  349. package/src/Dropdown/index.tsx +0 -71
  350. package/src/Dropdown/style/index.ts +0 -2
  351. package/src/Icon/iconfont/iconfont.css +0 -93
  352. package/src/Icon/iconfont/iconfont.js +0 -1
  353. package/src/Icon/iconfont/iconfont.ttf +0 -0
  354. package/src/Icon/iconfont/iconfont.woff +0 -0
  355. package/src/Icon/iconfont/iconfont.woff2 +0 -0
  356. package/src/Icon/index.tsx +0 -38
  357. package/src/Input/components/Group/index.tsx +0 -21
  358. package/src/Input/components/Password/index.tsx +0 -23
  359. package/src/Input/components/TextArea/index.tsx +0 -57
  360. package/src/Input/demo/allowClear/index.tsx +0 -10
  361. package/src/Input/demo/basic/index.less +0 -6
  362. package/src/Input/demo/basic/index.tsx +0 -25
  363. package/src/Input/demo/gourp/index.tsx +0 -30
  364. package/src/Input/demo/password/index.tsx +0 -11
  365. package/src/Input/demo/prefix/index.tsx +0 -13
  366. package/src/Input/demo/showCount/index.tsx +0 -16
  367. package/src/Input/demo/textArea/autoSize.tsx +0 -21
  368. package/src/Input/index.md +0 -37
  369. package/src/Input/index.test.tsx +0 -78
  370. package/src/Input/index.tsx +0 -91
  371. package/src/Input/style/index.ts +0 -2
  372. package/src/Menu/Divider.tsx +0 -12
  373. package/src/Menu/MenuItem.tsx +0 -24
  374. package/src/Menu/SubMenu.tsx +0 -37
  375. package/src/Menu/index.md +0 -36
  376. package/src/Menu/index.test.tsx +0 -144
  377. package/src/Menu/index.tsx +0 -27
  378. package/src/Menu/style/index.ts +0 -2
  379. package/src/Select/BaseSelect.tsx +0 -321
  380. package/src/Select/OptionsList/OptionItem.tsx +0 -151
  381. package/src/Select/OptionsList/Options.tsx +0 -11
  382. package/src/Select/OptionsList/index.tsx +0 -169
  383. package/src/Select/Selector/index.tsx +0 -211
  384. package/src/Select/VirtualList.tsx +0 -36
  385. package/src/Select/demo/disabled/index.tsx +0 -44
  386. package/src/Select/demo/multiple/index.tsx +0 -77
  387. package/src/Select/demo/options/index.tsx +0 -63
  388. package/src/Select/demo/single/index.tsx +0 -50
  389. package/src/Select/hooks/useCacheOption.ts +0 -67
  390. package/src/Select/index.md +0 -72
  391. package/src/Select/index.tsx +0 -23
  392. package/src/Select/interface.ts +0 -231
  393. package/src/Select/style/index.ts +0 -2
  394. package/src/Select/utils.tsx +0 -133
  395. package/src/Tabs/TabPane.tsx +0 -28
  396. package/src/Tabs/demo/adaptHeight/index.tsx +0 -33
  397. package/src/Tabs/demo/basic/index.tsx +0 -30
  398. package/src/Tabs/demo/horizontalScroll/index.tsx +0 -36
  399. package/src/Tabs/index.md +0 -30
  400. package/src/Tabs/index.test.tsx +0 -100
  401. package/src/Tabs/index.tsx +0 -64
  402. package/src/Tabs/style/index.ts +0 -2
  403. package/src/Tooltip/demo/basic/index.tsx +0 -10
  404. package/src/Tooltip/demo/overflow/index.tsx +0 -10
  405. package/src/Tooltip/demo/placement/index.tsx +0 -60
  406. package/src/Tooltip/demo/trigger/index.tsx +0 -22
  407. package/src/Tooltip/index.md +0 -28
  408. package/src/Tooltip/index.test.tsx +0 -152
  409. package/src/Tooltip/index.tsx +0 -113
  410. package/src/Tooltip/style/index.ts +0 -2
  411. package/src/_utils/hooks/useControlledState.ts +0 -39
  412. package/src/_utils/hooks/usePrefixCls.ts +0 -11
  413. package/tsconfig.json +0 -13
  414. package/typings.d.ts +0 -3
@@ -0,0 +1,227 @@
1
+ import _ from 'lodash';
2
+ import React from 'react';
3
+ declare type TSize = 'small' | 'default' | 'large';
4
+ export declare type TMaybeArray<T> = T | T[];
5
+ export declare type modeType = 'string' | 'tags' | undefined;
6
+ export declare type searchType = 'normal' | 'inner' | 'no-search';
7
+ export interface IOption {
8
+ /**
9
+ 列表单项主要文字
10
+ */
11
+ label?: string | React.ReactNode;
12
+ /**
13
+ 作为列表的 `key` 来使用
14
+ */
15
+ value: string | number;
16
+ /**
17
+ 列表次要文字
18
+ */
19
+ /**
20
+ 是否禁用
21
+ */
22
+ disabled?: boolean;
23
+ /**
24
+ * 选中该 Option 后,Select 的 title
25
+ */
26
+ title?: string;
27
+ /**
28
+ `tooltip` 描述
29
+ */
30
+ tooltip?: string;
31
+ /**
32
+ 分组的 `key` ,与 `groupLabel` 一起使用
33
+ */
34
+ groupValue?: string;
35
+ /**
36
+ 分组的标题
37
+ */
38
+ groupLabel?: string;
39
+ options?: Map<string | number, IOption>;
40
+ isSelectOptGroup?: boolean;
41
+ }
42
+ export interface IOptGroupProps {
43
+ children?: React.ReactNode;
44
+ label: string | React.ReactNode;
45
+ value: string | number;
46
+ }
47
+ export interface IOptionProps {
48
+ children?: React.ReactNode;
49
+ /**
50
+ * @description 默认根据次属性值进行筛选
51
+ */
52
+ value: string | number;
53
+ /**
54
+ * @description 是否禁用
55
+ * @default false
56
+ */
57
+ disabled?: boolean;
58
+ title?: string;
59
+ }
60
+ export interface ISelectProps {
61
+ /**
62
+ * @description 输入框尺寸
63
+ * @default default
64
+ * @type 'small' | 'default' | 'large';
65
+ */
66
+ size?: TSize;
67
+ customizePrefixCls?: string;
68
+ /**
69
+ * @description 多选模式
70
+ * @default false
71
+ */
72
+ multiple?: boolean;
73
+ /**
74
+ * @description 选择框默认文本
75
+ */
76
+ placeholder?: string;
77
+ /**
78
+ * @description 是否禁用
79
+ * @default false
80
+ */
81
+ disabled?: boolean;
82
+ /**
83
+ * @description 是否默认展开下拉菜单
84
+ * @default false
85
+ */
86
+ defaultOpen?: boolean;
87
+ className?: string;
88
+ /**
89
+ * @description 下拉菜单的 className 属性
90
+ */
91
+ dropDownClassName?: string;
92
+ style?: React.CSSProperties;
93
+ groupStyle?: React.CSSProperties;
94
+ optionStyle?: React.CSSProperties;
95
+ /**
96
+ * @description 下拉菜单的 style 属性
97
+ */
98
+ dropDownStyle?: React.CSSProperties;
99
+ /**
100
+ * @description 指定默认选中的条目
101
+ */
102
+ defaultValue?: TMaybeArray<string | number> | null;
103
+ /**
104
+ * @description 指定当前选中的条目,多选时为一个数组。
105
+ */
106
+ value?: TMaybeArray<string | number> | null;
107
+ /**
108
+ * @description 数据化配置选项内容,相比 jsx 定义会获得更好的渲染性能
109
+ */
110
+ options?: IOption[];
111
+ /**
112
+ * @description 设置弹窗滚动高度
113
+ * @default 256
114
+ */
115
+ listHeight?: number;
116
+ listRowHeight?: number;
117
+ labelRenderer?: (input: string) => (option: IOption, isGroup: boolean) => React.ReactNode;
118
+ searchPredicate?: (input: string) => _.ListIterateeCustom<IOption, boolean>;
119
+ matchPredicate?: (input: string) => _.ListIterateeCustom<IOption, boolean>;
120
+ optionLabelRenderer?: (value: string | number, option?: IOption) => React.ReactNode;
121
+ /**
122
+ * @description 选中值改变时的回调
123
+ */
124
+ onChange?: (value: TMaybeArray<string | number> | null, options?: TMaybeArray<IOption> | null) => void;
125
+ /**
126
+ * @description 被选中时调用,参数为选中项的 value
127
+ */
128
+ onSelect?: (value: string | number, option: IOption) => void;
129
+ /**
130
+ * @description 开启清除功能
131
+ */
132
+ allowClear?: boolean;
133
+ /**
134
+ * @description 清除的回调
135
+ */
136
+ onClear?: () => void;
137
+ /**
138
+ * 浮层渲染父节点,默认渲染到 body 上
139
+ */
140
+ getContainer?: (node: HTMLElement) => HTMLElement;
141
+ /**
142
+ * @description 是否展开下拉菜单
143
+ */
144
+ open?: boolean;
145
+ /**
146
+ * dropdown visible 值改变时的回调
147
+ */
148
+ onDropDownVisibleChange?: (visible: boolean) => void;
149
+ /** *
150
+ * @description 下拉菜单和选择器同宽
151
+ * @default true
152
+ */
153
+ dropdownMatchSelectWidth?: boolean;
154
+ /**
155
+ * @description 下拉菜单内置标签
156
+ */
157
+ label?: React.ReactNode;
158
+ children?: React.ReactNode[] | React.ReactNode;
159
+ }
160
+ export interface ISelectorProps {
161
+ input: string;
162
+ disabled: boolean;
163
+ prefix: string;
164
+ size: 'small' | 'default' | 'large';
165
+ multiple: boolean;
166
+ bordered: boolean;
167
+ isFocused: boolean;
168
+ className?: string | undefined;
169
+ visible: boolean;
170
+ style?: React.CSSProperties | undefined;
171
+ allowClear: boolean;
172
+ mode?: modeType;
173
+ label?: React.ReactNode;
174
+ value?: TMaybeArray<string | number> | undefined | null;
175
+ filteredOptions: IOption[];
176
+ searchType: searchType;
177
+ placeholder?: string;
178
+ optionLabelRenderer: (value: string | number, option?: IOption) => React.ReactNode;
179
+ getOptionByValue: (optValue: string | number) => IOption;
180
+ onInputChange: (value: string) => void;
181
+ onAllowClear: () => void;
182
+ deleteValue: (value: React.ReactText[], v: string | number) => void;
183
+ arrowComponent?: React.ReactElement | undefined;
184
+ closeComponent?: React.ReactElement | undefined;
185
+ }
186
+ export interface IVirtualListProps {
187
+ itemHeight?: number;
188
+ height?: number;
189
+ prefixCls?: string;
190
+ children: React.ReactNode;
191
+ data: IOption[];
192
+ virtual?: boolean;
193
+ itemKey: string | number | ((item: never) => React.ReactText);
194
+ }
195
+ export interface IOptionsListProps {
196
+ style?: React.CSSProperties;
197
+ input: string;
198
+ prefixCls: string;
199
+ groupStyle?: React.CSSProperties;
200
+ optionStyle?: React.CSSProperties;
201
+ selected?: TMaybeArray<React.ReactText> | null;
202
+ multiple: boolean;
203
+ isMode?: boolean;
204
+ optionChecked?: TMaybeArray<React.ReactText>;
205
+ visible?: boolean;
206
+ isUseAll?: boolean;
207
+ data: IOption[];
208
+ hasGroup: boolean;
209
+ searchType: searchType;
210
+ placeholder?: string;
211
+ notFoundContent?: React.ReactElement;
212
+ onTempValueChange: (tempValue: React.ReactText[]) => void;
213
+ setTempValue: (values: React.ReactText[]) => void;
214
+ value?: TMaybeArray<React.ReactText> | null;
215
+ tempValue: React.ReactText[];
216
+ isFooter?: boolean;
217
+ labelRenderer: (option: IOption, isGruop: false) => React.ReactNode;
218
+ onOptionClick: (selectedValue: string | number) => void;
219
+ getContainer?: (node: HTMLElement) => HTMLElement;
220
+ onValueChange?: (optionValues: TMaybeArray<string | number> | null) => void;
221
+ onInputChange: (value: string) => void;
222
+ height?: number | undefined;
223
+ itemHeight?: number | undefined;
224
+ activeIndex: number;
225
+ setActiveIndex: React.Dispatch<React.SetStateAction<number>>;
226
+ }
227
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import '../../style';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import '../../style';
2
+ import './index.less';
@@ -130,7 +130,8 @@
130
130
  // box-shadow: 0 0 6px 0 @color-box-shadow-focused;
131
131
 
132
132
  .@{select-prefix-cls-legacy} {
133
- &-item-all {
133
+ &-item-all,
134
+ &-item {
134
135
  opacity: 0.5;
135
136
  }
136
137
  }
@@ -165,6 +166,7 @@
165
166
  line-height: 22px;
166
167
  white-space: nowrap;
167
168
  text-overflow: ellipsis;
169
+ color: @NL0;
168
170
  }
169
171
  }
170
172
 
@@ -351,15 +353,6 @@
351
353
  }
352
354
  }
353
355
 
354
- &-single,
355
- &-focused {
356
- .@{select-prefix-cls-legacy} {
357
- &-item {
358
- opacity: 0.5;
359
- }
360
- }
361
- }
362
-
363
356
  // rc-trigger
364
357
  &-dropdown {
365
358
  position: absolute;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { IOption } from './interface';
3
+ interface IGroup {
4
+ groupLabel?: string;
5
+ groupValue?: string | number;
6
+ }
7
+ export declare const customOptionKeyPrefix = "select_custom_option_";
8
+ export declare const customOptionKey: string;
9
+ export declare function convertNodeToOption(node: React.ReactElement, group: IGroup): IOption;
10
+ export declare const getFlattenOptions: (data: IOption[], hasGroup: boolean) => IOption[];
11
+ export declare function convertChildrenToData(nodes: React.ReactElement[], group?: {}): IOption[];
12
+ export declare function handleOptions(mergedOptions: IOption[], setCacheOptions: (options: IOption[]) => void, updateGroup: (value: boolean) => void): {
13
+ flattenOptions: IOption[];
14
+ isGroup: boolean;
15
+ };
16
+ export declare const defaultLabelRenderer: (input: string, prefix: string) => (option: IOption, isGroup: boolean) => React.ReactNode;
17
+ export declare const defaultOptionLabelRenderer: (value: string | number, option?: IOption | undefined) => {};
18
+ export declare const defaultSearchPredicate: (input: string) => (o: IOption) => boolean;
19
+ export declare const defaultMatchPredicate: (input: string) => (o: IOption) => boolean;
20
+ export declare const CustomOption: (value: string | number, withGroup?: boolean, id?: string) => IOption;
21
+ export {};
@@ -0,0 +1,193 @@
1
+ var _excluded = ["value", "children"],
2
+ _excluded2 = ["options"];
3
+
4
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
+
6
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
+
8
+ 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); }
9
+
10
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
+
12
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
13
+
14
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
15
+
16
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
+
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
+
20
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+
22
+ 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; }
23
+
24
+ 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; }
25
+
26
+ import React from 'react';
27
+ import { concat, uniqueId } from 'lodash';
28
+ var ZERO_INDEX = 0;
29
+ var ungroupedOptionKeyPrefix = 'select_isungrouped_option_';
30
+ var ungroupedOptionKey = uniqueId(ungroupedOptionKeyPrefix);
31
+ var ungroupedOptionLabel = '未分组';
32
+ export var customOptionKeyPrefix = 'select_custom_option_';
33
+ export var customOptionKey = uniqueId(customOptionKeyPrefix); // ReactNode To Options
34
+
35
+ export function convertNodeToOption(node, group) {
36
+ var _node$props = node.props,
37
+ value = _node$props.value,
38
+ children = _node$props.children,
39
+ restProps = _objectWithoutProperties(_node$props, _excluded);
40
+
41
+ var groupValue = group.groupValue,
42
+ groupLabel = group.groupLabel;
43
+
44
+ if (groupLabel && groupLabel) {
45
+ return _objectSpread({
46
+ value: value,
47
+ label: children !== undefined ? children : value,
48
+ groupValue: groupValue,
49
+ groupLabel: groupLabel
50
+ }, restProps);
51
+ }
52
+
53
+ return _objectSpread({
54
+ value: value,
55
+ label: children !== undefined ? children : value
56
+ }, restProps);
57
+ }
58
+ export var getFlattenOptions = function getFlattenOptions(data, hasGroup) {
59
+ var groupMap = new Map();
60
+
61
+ if (!hasGroup) {
62
+ return data;
63
+ }
64
+
65
+ data === null || data === void 0 ? void 0 : data.map(function (cur) {
66
+ var gValue = groupMap.get(cur.groupValue);
67
+
68
+ if (gValue) {
69
+ var options = gValue.options,
70
+ rest = _objectWithoutProperties(gValue, _excluded2);
71
+
72
+ return groupMap.set(cur.groupValue, _objectSpread({
73
+ options: [].concat(_toConsumableArray(options), [cur])
74
+ }, rest));
75
+ }
76
+
77
+ return groupMap.set(cur.groupValue, {
78
+ label: cur.groupLabel,
79
+ value: cur.groupValue,
80
+ isSelectOptGroup: true,
81
+ options: [cur]
82
+ });
83
+ });
84
+ var flattenOption = [];
85
+ groupMap.forEach(function (value) {
86
+ flattenOption.push(value); // @ts-ignore
87
+
88
+ flattenOption.push.apply(flattenOption, _toConsumableArray(value.options));
89
+ });
90
+ return flattenOption;
91
+ };
92
+ export function convertChildrenToData(nodes) {
93
+ var group = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
94
+ var nodeOptions = [];
95
+ React.Children.forEach(nodes, function (node) {
96
+ if (! /*#__PURE__*/React.isValidElement(node)) {
97
+ return;
98
+ }
99
+
100
+ var isSelectOptGroup = node.type.isSelectOptGroup,
101
+ _node$props2 = node.props,
102
+ children = _node$props2.children,
103
+ label = _node$props2.label,
104
+ value = _node$props2.value; // 联合类型
105
+
106
+ if (!isSelectOptGroup) {
107
+ // option
108
+ nodeOptions.push(convertNodeToOption(node, group));
109
+ } else {
110
+ // Group
111
+ nodeOptions = concat(nodeOptions, convertChildrenToData(children, {
112
+ groupLabel: label,
113
+ groupValue: value
114
+ }));
115
+ }
116
+ });
117
+ return nodeOptions;
118
+ } // optionsMap flattenOptions
119
+
120
+ export function handleOptions(mergedOptions, setCacheOptions, updateGroup) {
121
+ var isGroup = !!mergedOptions.find(function (v) {
122
+ return Object.prototype.hasOwnProperty.call(v, 'groupValue');
123
+ });
124
+ var flattenOptions = [];
125
+ mergedOptions.forEach(function (option) {
126
+ var optionGroupLabel = option.groupLabel,
127
+ optionGroupValue = option.groupValue;
128
+
129
+ if (isGroup && !optionGroupValue && !optionGroupLabel) {
130
+ var ungroupedOption = _objectSpread(_objectSpread({}, option), {}, {
131
+ groupLabel: ungroupedOptionLabel,
132
+ groupValue: ungroupedOptionKey
133
+ });
134
+
135
+ flattenOptions.push(ungroupedOption);
136
+ } else {
137
+ flattenOptions.push(option);
138
+ }
139
+ });
140
+ updateGroup(isGroup);
141
+ setCacheOptions(flattenOptions);
142
+ return {
143
+ flattenOptions: flattenOptions,
144
+ isGroup: isGroup
145
+ };
146
+ } // provide search matching hightlight;
147
+
148
+ export var defaultLabelRenderer = function defaultLabelRenderer(input, prefix) {
149
+ return function (option, isGroup) {
150
+ var title = option.title,
151
+ label = option.label;
152
+
153
+ if (isGroup || typeof label !== 'string') {
154
+ return title || label;
155
+ }
156
+
157
+ var index = label.indexOf(input);
158
+ return /*#__PURE__*/React.createElement("div", {
159
+ style: {
160
+ display: 'inline-block',
161
+ lineHeight: '40px'
162
+ }
163
+ }, label.slice(ZERO_INDEX, index), /*#__PURE__*/React.createElement("span", {
164
+ className: "".concat(prefix, "-search-highlight")
165
+ }, label.slice(index, index + input.length)), label.slice(index + input.length));
166
+ };
167
+ };
168
+ export var defaultOptionLabelRenderer = function defaultOptionLabelRenderer(value, option) {
169
+ return (option === null || option === void 0 ? void 0 : option.title) || (option === null || option === void 0 ? void 0 : option.label) || value;
170
+ };
171
+ export var defaultSearchPredicate = function defaultSearchPredicate(input) {
172
+ return function (o) {
173
+ return typeof o.label === 'string' ? o.label.includes(input) : true;
174
+ };
175
+ };
176
+ export var defaultMatchPredicate = function defaultMatchPredicate(input) {
177
+ return function (o) {
178
+ return o.label === input;
179
+ };
180
+ };
181
+ export var CustomOption = function CustomOption(value) {
182
+ var withGroup = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
183
+ var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : customOptionKeyPrefix;
184
+ return withGroup ? {
185
+ value: value,
186
+ label: value.toString(),
187
+ groupValue: id,
188
+ groupLabel: '自由输入'
189
+ } : {
190
+ value: value,
191
+ label: value.toString()
192
+ };
193
+ };
@@ -0,0 +1,10 @@
1
+ export interface IData {
2
+ firstName: string;
3
+ lastName: string;
4
+ age: number;
5
+ visits: number;
6
+ progress: number;
7
+ status: string;
8
+ }
9
+ declare function makeData(length: number): IData[];
10
+ export { makeData };
@@ -0,0 +1,18 @@
1
+ function makeData(length) {
2
+ var data = [];
3
+
4
+ for (var i = 0; i < length; i++) {
5
+ data.push({
6
+ firstName: 'supermarket',
7
+ lastName: 'charity',
8
+ age: i + 1,
9
+ visits: Math.floor(Math.random() * 100),
10
+ progress: 41,
11
+ status: 'relationship'
12
+ });
13
+ }
14
+
15
+ return data;
16
+ }
17
+
18
+ export { makeData };
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,64 @@
1
+ import "antd/es/radio/style";
2
+ import _Radio from "antd/es/radio";
3
+
4
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
+
6
+ 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."); }
7
+
8
+ 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); }
9
+
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
+
12
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
13
+
14
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
+
16
+ import React from 'react';
17
+ import { Table } from '@aloudata/aloudata-design';
18
+ import { makeData } from './createData';
19
+ // import Table from '../../Example'
20
+ var columns = [{
21
+ title: 'First Name',
22
+ dataIndex: 'firstName',
23
+ width: 150
24
+ }, {
25
+ title: 'Last Name',
26
+ dataIndex: 'lastName'
27
+ }, {
28
+ title: 'Age',
29
+ dataIndex: 'age'
30
+ }, {
31
+ title: 'Visits',
32
+ dataIndex: 'visits'
33
+ }, {
34
+ title: 'Status',
35
+ dataIndex: 'status'
36
+ }, {
37
+ title: 'Profile Progress',
38
+ dataIndex: 'progress'
39
+ }];
40
+ export default (function () {
41
+ var _React$useState = React.useState(0),
42
+ _React$useState2 = _slicedToArray(_React$useState, 2),
43
+ scrollY = _React$useState2[0],
44
+ setScrollY = _React$useState2[1];
45
+
46
+ var handleChange = function handleChange(e) {
47
+ setScrollY(e.target.value);
48
+ };
49
+
50
+ return /*#__PURE__*/React.createElement("div", {
51
+ className: "ald-table-demo"
52
+ }, /*#__PURE__*/React.createElement(_Radio.Group, {
53
+ value: scrollY,
54
+ onChange: handleChange
55
+ }, /*#__PURE__*/React.createElement(_Radio.Button, {
56
+ value: 0
57
+ }, "\u65E0\u6EDA\u52A8"), /*#__PURE__*/React.createElement(_Radio.Button, {
58
+ value: 200
59
+ }, "\u5185\u90E8\u6EDA\u52A8")), /*#__PURE__*/React.createElement(Table, {
60
+ columns: columns,
61
+ scrollY: scrollY,
62
+ data: makeData(10)
63
+ }));
64
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { Table } from '@aloudata/aloudata-design';
3
+ import { makeData } from '../basic/createData'; // import Table from '../../Example'
4
+
5
+ var columns = [{
6
+ title: 'First Name',
7
+ dataIndex: 'firstName',
8
+ width: 150
9
+ }, {
10
+ title: 'Last Name',
11
+ dataIndex: 'lastName'
12
+ }, {
13
+ title: 'Age',
14
+ dataIndex: 'age'
15
+ }, {
16
+ title: 'Visits',
17
+ dataIndex: 'visits'
18
+ }, {
19
+ title: 'Status',
20
+ dataIndex: 'status'
21
+ }, {
22
+ title: 'Profile Progress',
23
+ dataIndex: 'progress',
24
+ render: function render(progress) {
25
+ return /*#__PURE__*/React.createElement("div", {
26
+ style: {
27
+ color: 'red'
28
+ }
29
+ }, "\u8FDB\u5EA6\uFF1A", progress);
30
+ }
31
+ }];
32
+ export default (function () {
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ className: "ald-table-demo"
35
+ }, /*#__PURE__*/React.createElement(Table, {
36
+ columns: columns,
37
+ data: makeData(10)
38
+ }));
39
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { Table, Input } from '@aloudata/aloudata-design';
3
+ import { makeData } from '../basic/createData'; // import Table from '../../Example'
4
+
5
+ var columns = [{
6
+ title: 'First Name',
7
+ dataIndex: 'firstName',
8
+ width: 150
9
+ }, {
10
+ title: 'Last Name',
11
+ dataIndex: 'lastName'
12
+ }, {
13
+ title: 'Age',
14
+ dataIndex: 'age'
15
+ }, {
16
+ title: 'Visits',
17
+ dataIndex: 'visits'
18
+ }, {
19
+ title: 'Status',
20
+ dataIndex: 'status'
21
+ }, {
22
+ title: 'Profile Progress',
23
+ dataIndex: 'progress'
24
+ }];
25
+ export default (function () {
26
+ return /*#__PURE__*/React.createElement("div", {
27
+ className: "ald-table-demo"
28
+ }, /*#__PURE__*/React.createElement(Table, {
29
+ columns: columns,
30
+ data: makeData(10),
31
+ renderHeaderRight: function renderHeaderRight() {
32
+ return /*#__PURE__*/React.createElement(Input, {
33
+ placeholder: "\u8BF7\u8F93\u5165"
34
+ });
35
+ }
36
+ }));
37
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;