@aloudata/aloudata-design 0.2.6 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (527) hide show
  1. package/es/Avatar/index.d.ts +15 -0
  2. package/es/Avatar/index.js +33 -0
  3. package/es/Avatar/style/index.d.ts +2 -0
  4. package/es/Avatar/style/index.js +2 -0
  5. package/es/Avatar/style/index.less +34 -0
  6. package/es/Breadcrumb/index.d.ts +8 -0
  7. package/es/Breadcrumb/index.js +36 -0
  8. package/es/Breadcrumb/style/index.d.ts +2 -0
  9. package/es/Breadcrumb/style/index.js +2 -0
  10. package/es/Breadcrumb/style/index.less +36 -0
  11. package/es/Button/index.d.ts +4 -4
  12. package/es/Button/index.js +45 -25
  13. package/es/Button/style/index.less +185 -150
  14. package/es/Button/style/variables.less +67 -0
  15. package/es/Checkbox/style/index.less +35 -1
  16. package/es/ConfigProvider/index.d.ts +1 -0
  17. package/es/ConfigProvider/index.js +1 -0
  18. package/es/Dropdown/Button.js +1 -1
  19. package/es/Dropdown/style/index.less +41 -8
  20. package/es/Empty/image/Authority.d.ts +3 -0
  21. package/es/Empty/image/Authority.js +360 -0
  22. package/es/Empty/image/Dataspace.d.ts +3 -0
  23. package/es/Empty/image/Dataspace.js +271 -0
  24. package/es/Empty/image/Search.d.ts +3 -0
  25. package/es/Empty/image/Search.js +156 -0
  26. package/es/Empty/image/Simple.d.ts +3 -0
  27. package/es/Empty/image/Simple.js +20 -0
  28. package/es/Empty/image/Worksheet.d.ts +3 -0
  29. package/es/Empty/image/Worksheet.js +270 -0
  30. package/es/Empty/image/empty.d.ts +3 -0
  31. package/es/Empty/image/empty.js +139 -0
  32. package/es/Empty/index.d.ts +21 -5
  33. package/es/Empty/index.js +84 -54
  34. package/es/Empty/style/index.less +56 -11
  35. package/es/Form/style/index.less +8 -0
  36. package/es/Icon/antdIconfont.d.ts +4 -0
  37. package/es/Icon/antdIconfont.js +2 -0
  38. package/es/Icon/components/Icon.d.ts +32 -0
  39. package/es/Icon/components/Icon.js +27 -0
  40. package/es/Icon/components/createFromScripts.d.ts +1 -0
  41. package/es/Icon/components/createFromScripts.js +35 -0
  42. package/es/Icon/iconSvgs/arrows_right_sm.svg +3 -0
  43. package/es/Icon/icons/AddLine.d.ts +13 -0
  44. package/es/Icon/icons/AddLine.js +66 -0
  45. package/es/Icon/icons/AlertFill.d.ts +13 -0
  46. package/es/Icon/icons/AlertFill.js +73 -0
  47. package/es/Icon/icons/ArrowsDownLine.d.ts +13 -0
  48. package/es/Icon/icons/ArrowsDownLine.js +66 -0
  49. package/es/Icon/icons/CancelFill.d.ts +13 -0
  50. package/es/Icon/icons/CancelFill.js +73 -0
  51. package/es/Icon/icons/CheckFill.d.ts +13 -0
  52. package/es/Icon/icons/CheckFill.js +73 -0
  53. package/es/Icon/icons/CloseLine.d.ts +13 -0
  54. package/es/Icon/icons/CloseLine.js +66 -0
  55. package/es/Icon/icons/DatabaseLine.d.ts +13 -0
  56. package/es/Icon/icons/DatabaseLine.js +66 -0
  57. package/es/Icon/icons/Deleteline.d.ts +13 -0
  58. package/es/Icon/icons/Deleteline.js +66 -0
  59. package/es/Icon/icons/DownloadLine.d.ts +13 -0
  60. package/es/Icon/icons/DownloadLine.js +73 -0
  61. package/es/Icon/icons/ErrorFill.d.ts +13 -0
  62. package/es/Icon/icons/ErrorFill.js +73 -0
  63. package/es/Icon/icons/EyeOffLine.d.ts +13 -0
  64. package/es/Icon/icons/EyeOffLine.js +73 -0
  65. package/es/Icon/icons/EyeOnLine.d.ts +13 -0
  66. package/es/Icon/icons/EyeOnLine.js +66 -0
  67. package/es/Icon/icons/FileLine.d.ts +13 -0
  68. package/es/Icon/icons/FileLine.js +73 -0
  69. package/es/Icon/icons/HomeFill.d.ts +13 -0
  70. package/es/Icon/icons/HomeFill.js +73 -0
  71. package/es/Icon/icons/IconBase.withSpan.tpl +58 -0
  72. package/es/Icon/icons/LightningLine.d.ts +13 -0
  73. package/es/Icon/icons/LightningLine.js +66 -0
  74. package/es/Icon/icons/Loading.d.ts +13 -0
  75. package/es/Icon/icons/Loading.js +66 -0
  76. package/es/Icon/icons/More.d.ts +13 -0
  77. package/es/Icon/icons/More.js +66 -0
  78. package/es/Icon/icons/NewWindowsLine.d.ts +13 -0
  79. package/es/Icon/icons/NewWindowsLine.js +74 -0
  80. package/es/Icon/icons/SearchLine.d.ts +13 -0
  81. package/es/Icon/icons/SearchLine.js +73 -0
  82. package/es/Icon/icons/SortAscendingLine.d.ts +13 -0
  83. package/es/Icon/icons/SortAscendingLine.js +66 -0
  84. package/es/Icon/icons/SortDescendingLine.d.ts +13 -0
  85. package/es/Icon/icons/SortDescendingLine.js +66 -0
  86. package/es/Icon/icons/TextLine.d.ts +13 -0
  87. package/es/Icon/icons/TextLine.js +73 -0
  88. package/es/Icon/icons/UserLine.d.ts +13 -0
  89. package/es/Icon/icons/UserLine.js +73 -0
  90. package/es/Icon/icons/style.css +9 -0
  91. package/es/Icon/icons/style.css.d.ts +10 -0
  92. package/es/Icon/index.d.ts +2 -13
  93. package/es/Icon/index.js +2 -45
  94. package/es/Icon/index.less +9 -17
  95. package/es/Icon/style/index.d.ts +1 -0
  96. package/es/Icon/style/index.js +1 -0
  97. package/es/Icon/style/index.less +0 -0
  98. package/es/Input/components/Group/index.d.ts +4 -2
  99. package/es/Input/components/Group/index.js +23 -1
  100. package/es/Input/components/Input/index.d.ts +1 -1
  101. package/es/Input/components/Input/index.js +12 -0
  102. package/es/Input/components/Password/index.d.ts +7 -1
  103. package/es/Input/components/Password/index.js +29 -6
  104. package/es/Input/style/index.less +278 -43
  105. package/es/InputNumber/index.d.ts +4 -0
  106. package/es/InputNumber/index.js +32 -0
  107. package/es/InputNumber/style/index.d.ts +2 -0
  108. package/es/InputNumber/style/index.js +2 -0
  109. package/es/InputNumber/style/index.less +224 -0
  110. package/es/Menu/Divider.d.ts +2 -1
  111. package/es/Menu/MenuItem.d.ts +2 -1
  112. package/es/Menu/SubMenu.d.ts +2 -1
  113. package/es/Menu/SubMenu.js +1 -1
  114. package/es/Menu/index.d.ts +2 -1
  115. package/es/Menu/style/index.less +5 -5
  116. package/es/Modal/index.d.ts +21 -0
  117. package/es/Modal/index.js +95 -0
  118. package/es/Modal/style/index.d.ts +2 -0
  119. package/es/Modal/style/index.js +2 -0
  120. package/es/Modal/style/index.less +206 -0
  121. package/es/Navigator/components/Header/index.d.ts +9 -0
  122. package/es/Navigator/components/Header/index.js +18 -0
  123. package/es/Navigator/components/Menu/index.d.ts +7 -13
  124. package/es/Navigator/components/Menu/index.js +26 -162
  125. package/es/Navigator/components/MenuItem/index.d.ts +21 -0
  126. package/es/Navigator/components/MenuItem/index.js +39 -0
  127. package/es/Navigator/index.d.ts +19 -8
  128. package/es/Navigator/index.js +6 -15
  129. package/es/Navigator/style/bg.png +0 -0
  130. package/es/Navigator/style/index.less +105 -174
  131. package/es/Popover/index.d.ts +5 -0
  132. package/es/Popover/index.js +22 -0
  133. package/es/Popover/style/index.d.ts +2 -0
  134. package/es/Popover/style/index.js +2 -0
  135. package/es/Popover/style/index.less +37 -0
  136. package/es/Radio/index.d.ts +2 -3
  137. package/es/Select/index.d.ts +37 -9
  138. package/es/Select/index.js +155 -7
  139. package/es/Select/rc-select/BaseSelect.d.ts +116 -0
  140. package/es/Select/rc-select/BaseSelect.js +641 -0
  141. package/es/Select/rc-select/OptGroup.d.ts +12 -0
  142. package/es/Select/{OptionsList → rc-select}/OptGroup.js +1 -0
  143. package/es/Select/rc-select/Option.d.ts +14 -0
  144. package/es/Select/{OptionsList/Options.js → rc-select/Option.js} +1 -0
  145. package/es/Select/rc-select/OptionList.d.ts +10 -0
  146. package/es/Select/rc-select/OptionList.js +401 -0
  147. package/es/Select/rc-select/Select.d.ts +109 -0
  148. package/es/Select/rc-select/Select.js +547 -0
  149. package/es/Select/rc-select/SelectContext.d.ts +20 -0
  150. package/es/Select/rc-select/SelectContext.js +4 -0
  151. package/es/Select/rc-select/SelectTrigger.d.ts +30 -0
  152. package/es/Select/rc-select/SelectTrigger.js +136 -0
  153. package/es/Select/rc-select/Selector/Input.d.ts +26 -0
  154. package/es/Select/rc-select/Selector/Input.js +114 -0
  155. package/es/Select/rc-select/Selector/MultipleSelector.d.ts +16 -0
  156. package/es/Select/rc-select/Selector/MultipleSelector.js +236 -0
  157. package/es/Select/rc-select/Selector/SingleSelector.d.ts +8 -0
  158. package/es/Select/rc-select/Selector/SingleSelector.js +112 -0
  159. package/es/Select/rc-select/Selector/index.d.ts +80 -0
  160. package/es/Select/rc-select/Selector/index.js +194 -0
  161. package/es/Select/rc-select/TransBtn.d.ts +12 -0
  162. package/es/Select/rc-select/TransBtn.js +42 -0
  163. package/es/Select/rc-select/hooks/useBaseProps.d.ts +13 -0
  164. package/es/Select/rc-select/hooks/useBaseProps.js +11 -0
  165. package/es/Select/rc-select/hooks/useCache.d.ts +7 -0
  166. package/es/Select/rc-select/hooks/useCache.js +49 -0
  167. package/es/Select/rc-select/hooks/useDelayReset.d.ts +5 -0
  168. package/es/Select/rc-select/hooks/useDelayReset.js +50 -0
  169. package/es/Select/rc-select/hooks/useFilterOptions.d.ts +3 -0
  170. package/es/Select/rc-select/hooks/useFilterOptions.js +75 -0
  171. package/es/Select/rc-select/hooks/useId.d.ts +5 -0
  172. package/es/Select/rc-select/hooks/useId.js +47 -0
  173. package/es/Select/rc-select/hooks/useLayoutEffect.d.ts +5 -0
  174. package/es/Select/rc-select/hooks/useLayoutEffect.js +17 -0
  175. package/es/Select/rc-select/hooks/useLock.d.ts +7 -0
  176. package/es/Select/rc-select/hooks/useLock.js +35 -0
  177. package/es/Select/rc-select/hooks/useOptions.d.ts +11 -0
  178. package/es/Select/rc-select/hooks/useOptions.js +53 -0
  179. package/es/Select/rc-select/hooks/useRefFunc.d.ts +5 -0
  180. package/es/Select/rc-select/hooks/useRefFunc.js +15 -0
  181. package/es/Select/rc-select/hooks/useSelectTriggerControl.d.ts +1 -0
  182. package/es/Select/rc-select/hooks/useSelectTriggerControl.js +40 -0
  183. package/es/Select/rc-select/index.d.ts +10 -0
  184. package/es/Select/rc-select/index.js +7 -0
  185. package/es/Select/rc-select/interface.d.ts +10 -0
  186. package/es/Select/{interface.js → rc-select/interface.js} +0 -0
  187. package/es/Select/rc-select/utils/commonUtil.d.ts +4 -0
  188. package/es/Select/rc-select/utils/commonUtil.js +12 -0
  189. package/es/Select/rc-select/utils/keyUtil.d.ts +2 -0
  190. package/es/Select/rc-select/utils/keyUtil.js +8 -0
  191. package/es/Select/rc-select/utils/legacyUtil.d.ts +3 -0
  192. package/es/Select/rc-select/utils/legacyUtil.js +58 -0
  193. package/es/Select/rc-select/utils/platformUtil.d.ts +1 -0
  194. package/es/Select/rc-select/utils/platformUtil.js +4 -0
  195. package/es/Select/rc-select/utils/valueUtil.d.ts +22 -0
  196. package/es/Select/rc-select/utils/valueUtil.js +157 -0
  197. package/es/Select/rc-select/utils/warningPropsUtil.d.ts +3 -0
  198. package/es/Select/rc-select/utils/warningPropsUtil.js +114 -0
  199. package/es/Select/style/index.d.ts +1 -0
  200. package/es/Select/style/index.js +3 -1
  201. package/es/Select/style/index.less +230 -480
  202. package/es/Select/style/multiple.less +222 -0
  203. package/es/Select/style/rtl.less +168 -0
  204. package/es/Select/style/select.less +337 -0
  205. package/es/Select/style/single.less +179 -0
  206. package/es/Select/style/status.less +48 -0
  207. package/es/Select/style/variables.less +67 -0
  208. package/es/Select/style/variables.less.d.ts +100 -0
  209. package/es/Select/utils/iconUtil.d.ts +24 -0
  210. package/es/Select/utils/iconUtil.js +82 -0
  211. package/es/Space/index.d.ts +1 -1
  212. package/es/Space/index.js +0 -1
  213. package/es/Table/Table.d.ts +5 -0
  214. package/es/Table/Table.js +473 -0
  215. package/es/Table/index.d.ts +2 -4
  216. package/es/Table/index.js +2 -463
  217. package/es/Table/interface.d.ts +11 -15
  218. package/es/Table/style/index.less +51 -21
  219. package/es/Tabs/index.d.ts +2 -1
  220. package/es/Tabs/index.js +10 -4
  221. package/es/Tabs/style/index.less +73 -7
  222. package/es/Tooltip/style/index.less +2 -1
  223. package/es/index.d.ts +15 -2
  224. package/es/index.js +8 -1
  225. package/es/style/index.less +3 -1
  226. package/es/style/mixins/index.less +8 -0
  227. package/es/style/themes/default/index.less +10 -10
  228. package/es/style/themes/default/scrollBar.less +13 -0
  229. package/es/style/themes/default/themeColor.module.less +58 -94
  230. package/es/style/themes/default/themeColor.module.less.d.ts +1 -17
  231. package/lib/Avatar/index.d.ts +15 -0
  232. package/lib/Avatar/index.js +57 -0
  233. package/lib/Avatar/style/index.d.ts +2 -0
  234. package/lib/Avatar/style/index.js +5 -0
  235. package/lib/Avatar/style/index.less +34 -0
  236. package/lib/Breadcrumb/index.d.ts +8 -0
  237. package/lib/Breadcrumb/index.js +50 -0
  238. package/lib/Breadcrumb/style/index.d.ts +2 -0
  239. package/lib/Breadcrumb/style/index.js +5 -0
  240. package/lib/Breadcrumb/style/index.less +36 -0
  241. package/lib/Button/index.d.ts +4 -4
  242. package/lib/Button/index.js +45 -25
  243. package/lib/Button/style/index.less +185 -150
  244. package/lib/Button/style/variables.less +67 -0
  245. package/lib/Checkbox/style/index.less +35 -1
  246. package/lib/ConfigProvider/index.d.ts +1 -0
  247. package/lib/ConfigProvider/index.js +26 -0
  248. package/lib/Dropdown/Button.js +1 -1
  249. package/lib/Dropdown/style/index.less +41 -8
  250. package/lib/Empty/image/Authority.d.ts +3 -0
  251. package/lib/Empty/image/Authority.js +374 -0
  252. package/lib/Empty/image/Dataspace.d.ts +3 -0
  253. package/lib/Empty/image/Dataspace.js +285 -0
  254. package/lib/Empty/image/Search.d.ts +3 -0
  255. package/lib/Empty/image/Search.js +170 -0
  256. package/lib/Empty/image/Simple.d.ts +3 -0
  257. package/lib/Empty/image/Simple.js +34 -0
  258. package/lib/Empty/image/Worksheet.d.ts +3 -0
  259. package/lib/Empty/image/Worksheet.js +284 -0
  260. package/lib/Empty/image/empty.d.ts +3 -0
  261. package/lib/Empty/image/empty.js +153 -0
  262. package/lib/Empty/index.d.ts +21 -5
  263. package/lib/Empty/index.js +94 -53
  264. package/lib/Empty/style/index.less +56 -11
  265. package/lib/Form/style/index.less +8 -0
  266. package/lib/Icon/antdIconfont.d.ts +4 -0
  267. package/lib/Icon/antdIconfont.js +13 -0
  268. package/lib/Icon/components/Icon.d.ts +32 -0
  269. package/lib/Icon/components/Icon.js +38 -0
  270. package/lib/Icon/components/createFromScripts.d.ts +1 -0
  271. package/lib/Icon/components/createFromScripts.js +41 -0
  272. package/lib/Icon/iconSvgs/arrows_right_sm.svg +3 -0
  273. package/lib/Icon/icons/AddLine.d.ts +13 -0
  274. package/lib/Icon/icons/AddLine.js +83 -0
  275. package/lib/Icon/icons/AlertFill.d.ts +13 -0
  276. package/lib/Icon/icons/AlertFill.js +90 -0
  277. package/lib/Icon/icons/ArrowsDownLine.d.ts +13 -0
  278. package/lib/Icon/icons/ArrowsDownLine.js +83 -0
  279. package/lib/Icon/icons/CancelFill.d.ts +13 -0
  280. package/lib/Icon/icons/CancelFill.js +90 -0
  281. package/lib/Icon/icons/CheckFill.d.ts +13 -0
  282. package/lib/Icon/icons/CheckFill.js +90 -0
  283. package/lib/Icon/icons/CloseLine.d.ts +13 -0
  284. package/lib/Icon/icons/CloseLine.js +83 -0
  285. package/lib/Icon/icons/DatabaseLine.d.ts +13 -0
  286. package/lib/Icon/icons/DatabaseLine.js +83 -0
  287. package/lib/Icon/icons/Deleteline.d.ts +13 -0
  288. package/lib/Icon/icons/Deleteline.js +83 -0
  289. package/lib/Icon/icons/DownloadLine.d.ts +13 -0
  290. package/lib/Icon/icons/DownloadLine.js +90 -0
  291. package/lib/Icon/icons/ErrorFill.d.ts +13 -0
  292. package/lib/Icon/icons/ErrorFill.js +90 -0
  293. package/lib/Icon/icons/EyeOffLine.d.ts +13 -0
  294. package/lib/Icon/icons/EyeOffLine.js +90 -0
  295. package/lib/Icon/icons/EyeOnLine.d.ts +13 -0
  296. package/lib/Icon/icons/EyeOnLine.js +83 -0
  297. package/lib/Icon/icons/FileLine.d.ts +13 -0
  298. package/lib/Icon/icons/FileLine.js +90 -0
  299. package/lib/Icon/icons/HomeFill.d.ts +13 -0
  300. package/lib/Icon/icons/HomeFill.js +90 -0
  301. package/lib/Icon/icons/IconBase.withSpan.tpl +58 -0
  302. package/lib/Icon/icons/LightningLine.d.ts +13 -0
  303. package/lib/Icon/icons/LightningLine.js +83 -0
  304. package/lib/Icon/icons/Loading.d.ts +13 -0
  305. package/lib/Icon/icons/Loading.js +83 -0
  306. package/lib/Icon/icons/More.d.ts +13 -0
  307. package/lib/Icon/icons/More.js +83 -0
  308. package/lib/Icon/icons/NewWindowsLine.d.ts +13 -0
  309. package/lib/Icon/icons/NewWindowsLine.js +91 -0
  310. package/lib/Icon/icons/SearchLine.d.ts +13 -0
  311. package/lib/Icon/icons/SearchLine.js +90 -0
  312. package/lib/Icon/icons/SortAscendingLine.d.ts +13 -0
  313. package/lib/Icon/icons/SortAscendingLine.js +83 -0
  314. package/lib/Icon/icons/SortDescendingLine.d.ts +13 -0
  315. package/lib/Icon/icons/SortDescendingLine.js +83 -0
  316. package/lib/Icon/icons/TextLine.d.ts +13 -0
  317. package/lib/Icon/icons/TextLine.js +90 -0
  318. package/lib/Icon/icons/UserLine.d.ts +13 -0
  319. package/lib/Icon/icons/UserLine.js +90 -0
  320. package/lib/Icon/icons/style.css +9 -0
  321. package/lib/Icon/icons/style.css.d.ts +10 -0
  322. package/lib/Icon/index.d.ts +2 -13
  323. package/lib/Icon/index.js +2 -51
  324. package/lib/Icon/index.less +9 -17
  325. package/lib/Icon/style/index.d.ts +1 -0
  326. package/lib/Icon/style/index.js +1 -0
  327. package/lib/Icon/style/index.less +0 -0
  328. package/lib/Input/components/Group/index.d.ts +4 -2
  329. package/lib/Input/components/Group/index.js +24 -1
  330. package/lib/Input/components/Input/index.d.ts +1 -1
  331. package/lib/Input/components/Input/index.js +13 -0
  332. package/lib/Input/components/Password/index.d.ts +7 -1
  333. package/lib/Input/components/Password/index.js +30 -5
  334. package/lib/Input/style/index.less +278 -43
  335. package/lib/InputNumber/index.d.ts +4 -0
  336. package/lib/InputNumber/index.js +45 -0
  337. package/lib/InputNumber/style/index.d.ts +2 -0
  338. package/lib/InputNumber/style/index.js +5 -0
  339. package/lib/InputNumber/style/index.less +224 -0
  340. package/lib/Menu/Divider.d.ts +2 -1
  341. package/lib/Menu/MenuItem.d.ts +2 -1
  342. package/lib/Menu/SubMenu.d.ts +2 -1
  343. package/lib/Menu/SubMenu.js +1 -1
  344. package/lib/Menu/index.d.ts +2 -1
  345. package/lib/Menu/style/index.less +5 -5
  346. package/lib/Modal/index.d.ts +21 -0
  347. package/lib/Modal/index.js +121 -0
  348. package/lib/Modal/style/index.d.ts +2 -0
  349. package/lib/Modal/style/index.js +5 -0
  350. package/lib/Modal/style/index.less +206 -0
  351. package/lib/Navigator/components/Header/index.d.ts +9 -0
  352. package/lib/Navigator/components/Header/index.js +28 -0
  353. package/lib/Navigator/components/Menu/index.d.ts +7 -13
  354. package/lib/Navigator/components/Menu/index.js +25 -162
  355. package/lib/Navigator/components/MenuItem/index.d.ts +21 -0
  356. package/lib/Navigator/components/MenuItem/index.js +56 -0
  357. package/lib/Navigator/index.d.ts +19 -8
  358. package/lib/Navigator/index.js +7 -15
  359. package/lib/Navigator/style/bg.png +0 -0
  360. package/lib/Navigator/style/index.less +105 -174
  361. package/lib/Popover/index.d.ts +5 -0
  362. package/lib/Popover/index.js +35 -0
  363. package/lib/Popover/style/index.d.ts +2 -0
  364. package/lib/Popover/style/index.js +5 -0
  365. package/lib/Popover/style/index.less +37 -0
  366. package/lib/Radio/index.d.ts +2 -3
  367. package/lib/Select/index.d.ts +37 -9
  368. package/lib/Select/index.js +167 -18
  369. package/lib/Select/rc-select/BaseSelect.d.ts +116 -0
  370. package/lib/Select/rc-select/BaseSelect.js +672 -0
  371. package/lib/Select/rc-select/OptGroup.d.ts +12 -0
  372. package/lib/Select/{OptionsList → rc-select}/OptGroup.js +1 -0
  373. package/lib/Select/rc-select/Option.d.ts +14 -0
  374. package/lib/Select/{OptionsList/Options.js → rc-select/Option.js} +1 -0
  375. package/lib/Select/rc-select/OptionList.d.ts +10 -0
  376. package/lib/Select/rc-select/OptionList.js +427 -0
  377. package/lib/Select/rc-select/Select.d.ts +109 -0
  378. package/lib/Select/rc-select/Select.js +545 -0
  379. package/lib/Select/rc-select/SelectContext.d.ts +20 -0
  380. package/lib/Select/rc-select/SelectContext.js +19 -0
  381. package/lib/Select/rc-select/SelectTrigger.d.ts +30 -0
  382. package/lib/Select/rc-select/SelectTrigger.js +153 -0
  383. package/lib/Select/rc-select/Selector/Input.d.ts +26 -0
  384. package/lib/Select/rc-select/Selector/Input.js +132 -0
  385. package/lib/Select/rc-select/Selector/MultipleSelector.d.ts +16 -0
  386. package/lib/Select/rc-select/Selector/MultipleSelector.js +257 -0
  387. package/lib/Select/rc-select/Selector/SingleSelector.d.ts +8 -0
  388. package/lib/Select/rc-select/Selector/SingleSelector.js +129 -0
  389. package/lib/Select/rc-select/Selector/index.d.ts +80 -0
  390. package/lib/Select/rc-select/Selector/index.js +203 -0
  391. package/lib/Select/rc-select/TransBtn.d.ts +12 -0
  392. package/lib/Select/rc-select/TransBtn.js +59 -0
  393. package/lib/Select/rc-select/hooks/useBaseProps.d.ts +13 -0
  394. package/lib/Select/rc-select/hooks/useBaseProps.js +28 -0
  395. package/lib/Select/rc-select/hooks/useCache.d.ts +7 -0
  396. package/lib/Select/rc-select/hooks/useCache.js +63 -0
  397. package/lib/Select/rc-select/hooks/useDelayReset.d.ts +5 -0
  398. package/lib/Select/rc-select/hooks/useDelayReset.js +62 -0
  399. package/lib/Select/rc-select/hooks/useFilterOptions.d.ts +3 -0
  400. package/lib/Select/rc-select/hooks/useFilterOptions.js +91 -0
  401. package/lib/Select/rc-select/hooks/useId.d.ts +5 -0
  402. package/lib/Select/rc-select/hooks/useId.js +68 -0
  403. package/lib/Select/rc-select/hooks/useLayoutEffect.d.ts +5 -0
  404. package/lib/Select/rc-select/hooks/useLayoutEffect.js +32 -0
  405. package/lib/Select/rc-select/hooks/useLock.d.ts +7 -0
  406. package/lib/Select/rc-select/hooks/useLock.js +49 -0
  407. package/lib/Select/rc-select/hooks/useOptions.d.ts +11 -0
  408. package/lib/Select/rc-select/hooks/useOptions.js +68 -0
  409. package/lib/Select/rc-select/hooks/useRefFunc.d.ts +5 -0
  410. package/lib/Select/rc-select/hooks/useRefFunc.js +29 -0
  411. package/lib/Select/rc-select/hooks/useSelectTriggerControl.d.ts +1 -0
  412. package/lib/Select/rc-select/hooks/useSelectTriggerControl.js +54 -0
  413. package/lib/Select/rc-select/index.d.ts +10 -0
  414. package/lib/Select/rc-select/index.js +45 -0
  415. package/lib/Select/rc-select/interface.d.ts +10 -0
  416. package/lib/Select/{interface.js → rc-select/interface.js} +0 -0
  417. package/lib/Select/rc-select/utils/commonUtil.d.ts +4 -0
  418. package/lib/Select/rc-select/utils/commonUtil.js +23 -0
  419. package/lib/Select/rc-select/utils/keyUtil.d.ts +2 -0
  420. package/lib/Select/rc-select/utils/keyUtil.js +17 -0
  421. package/lib/Select/rc-select/utils/legacyUtil.d.ts +3 -0
  422. package/lib/Select/rc-select/utils/legacyUtil.js +73 -0
  423. package/lib/Select/rc-select/utils/platformUtil.d.ts +1 -0
  424. package/lib/Select/rc-select/utils/platformUtil.js +11 -0
  425. package/lib/Select/rc-select/utils/valueUtil.d.ts +22 -0
  426. package/lib/Select/rc-select/utils/valueUtil.js +172 -0
  427. package/lib/Select/rc-select/utils/warningPropsUtil.d.ts +3 -0
  428. package/lib/Select/rc-select/utils/warningPropsUtil.js +132 -0
  429. package/lib/Select/style/index.d.ts +1 -0
  430. package/lib/Select/style/index.js +2 -0
  431. package/lib/Select/style/index.less +230 -480
  432. package/lib/Select/style/multiple.less +222 -0
  433. package/lib/Select/style/rtl.less +168 -0
  434. package/lib/Select/style/select.less +337 -0
  435. package/lib/Select/style/single.less +179 -0
  436. package/lib/Select/style/status.less +48 -0
  437. package/lib/Select/style/variables.less +67 -0
  438. package/lib/Select/style/variables.less.d.ts +100 -0
  439. package/lib/Select/utils/iconUtil.d.ts +24 -0
  440. package/lib/Select/utils/iconUtil.js +102 -0
  441. package/lib/Space/index.d.ts +1 -1
  442. package/lib/Space/index.js +0 -6
  443. package/lib/Table/Table.d.ts +5 -0
  444. package/lib/Table/Table.js +501 -0
  445. package/lib/Table/index.d.ts +2 -4
  446. package/lib/Table/index.js +2 -478
  447. package/lib/Table/interface.d.ts +11 -15
  448. package/lib/Table/style/index.less +51 -21
  449. package/lib/Tabs/index.d.ts +2 -1
  450. package/lib/Tabs/index.js +11 -4
  451. package/lib/Tabs/style/index.less +73 -7
  452. package/lib/Tooltip/style/index.less +2 -1
  453. package/lib/index.d.ts +15 -2
  454. package/lib/index.js +56 -0
  455. package/lib/style/index.less +3 -1
  456. package/lib/style/mixins/index.less +8 -0
  457. package/lib/style/themes/default/index.less +10 -10
  458. package/lib/style/themes/default/scrollBar.less +13 -0
  459. package/lib/style/themes/default/themeColor.module.less +58 -94
  460. package/lib/style/themes/default/themeColor.module.less.d.ts +1 -17
  461. package/package.json +3 -2
  462. package/es/Icon/iconfont/demo.css +0 -539
  463. package/es/Icon/iconfont/demo_index.html +0 -720
  464. package/es/Icon/iconfont/iconfont.css +0 -109
  465. package/es/Icon/iconfont/iconfont.js +0 -46
  466. package/es/Icon/iconfont/iconfont.json +0 -170
  467. package/es/Icon/iconfont/iconfont.ttf +0 -0
  468. package/es/Icon/iconfont/iconfont.woff +0 -0
  469. package/es/Icon/iconfont/iconfont.woff2 +0 -0
  470. package/es/Select/BaseSelect.d.ts +0 -5
  471. package/es/Select/BaseSelect.js +0 -413
  472. package/es/Select/OptionsList/OptGroup.d.ts +0 -7
  473. package/es/Select/OptionsList/OptionItem/RenderGroup.d.ts +0 -9
  474. package/es/Select/OptionsList/OptionItem/RenderGroup.js +0 -16
  475. package/es/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +0 -10
  476. package/es/Select/OptionsList/OptionItem/RenderLabelIcon.js +0 -45
  477. package/es/Select/OptionsList/OptionItem/RenderOption.d.ts +0 -16
  478. package/es/Select/OptionsList/OptionItem/RenderOption.js +0 -79
  479. package/es/Select/OptionsList/OptionItem/RenderTooltip.d.ts +0 -8
  480. package/es/Select/OptionsList/OptionItem/RenderTooltip.js +0 -25
  481. package/es/Select/OptionsList/OptionItem.d.ts +0 -4
  482. package/es/Select/OptionsList/OptionItem.js +0 -4
  483. package/es/Select/OptionsList/Options.d.ts +0 -7
  484. package/es/Select/OptionsList/index.d.ts +0 -4
  485. package/es/Select/OptionsList/index.js +0 -176
  486. package/es/Select/Selector/index.d.ts +0 -4
  487. package/es/Select/Selector/index.js +0 -252
  488. package/es/Select/VirtualList.d.ts +0 -5
  489. package/es/Select/VirtualList.js +0 -29
  490. package/es/Select/hooks/useCacheOption.d.ts +0 -9
  491. package/es/Select/hooks/useCacheOption.js +0 -107
  492. package/es/Select/interface.d.ts +0 -235
  493. package/es/Select/utils.d.ts +0 -21
  494. package/es/Select/utils.js +0 -193
  495. package/lib/Icon/iconfont/demo.css +0 -539
  496. package/lib/Icon/iconfont/demo_index.html +0 -720
  497. package/lib/Icon/iconfont/iconfont.css +0 -109
  498. package/lib/Icon/iconfont/iconfont.js +0 -48
  499. package/lib/Icon/iconfont/iconfont.json +0 -170
  500. package/lib/Icon/iconfont/iconfont.ttf +0 -0
  501. package/lib/Icon/iconfont/iconfont.woff +0 -0
  502. package/lib/Icon/iconfont/iconfont.woff2 +0 -0
  503. package/lib/Select/BaseSelect.d.ts +0 -5
  504. package/lib/Select/BaseSelect.js +0 -446
  505. package/lib/Select/OptionsList/OptGroup.d.ts +0 -7
  506. package/lib/Select/OptionsList/OptionItem/RenderGroup.d.ts +0 -9
  507. package/lib/Select/OptionsList/OptionItem/RenderGroup.js +0 -27
  508. package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +0 -10
  509. package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.js +0 -60
  510. package/lib/Select/OptionsList/OptionItem/RenderOption.d.ts +0 -16
  511. package/lib/Select/OptionsList/OptionItem/RenderOption.js +0 -94
  512. package/lib/Select/OptionsList/OptionItem/RenderTooltip.d.ts +0 -8
  513. package/lib/Select/OptionsList/OptionItem/RenderTooltip.js +0 -37
  514. package/lib/Select/OptionsList/OptionItem.d.ts +0 -4
  515. package/lib/Select/OptionsList/OptionItem.js +0 -39
  516. package/lib/Select/OptionsList/Options.d.ts +0 -7
  517. package/lib/Select/OptionsList/index.d.ts +0 -4
  518. package/lib/Select/OptionsList/index.js +0 -195
  519. package/lib/Select/Selector/index.d.ts +0 -4
  520. package/lib/Select/Selector/index.js +0 -276
  521. package/lib/Select/VirtualList.d.ts +0 -5
  522. package/lib/Select/VirtualList.js +0 -42
  523. package/lib/Select/hooks/useCacheOption.d.ts +0 -9
  524. package/lib/Select/hooks/useCacheOption.js +0 -113
  525. package/lib/Select/interface.d.ts +0 -235
  526. package/lib/Select/utils.d.ts +0 -21
  527. package/lib/Select/utils.js +0 -233
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.convertChildrenToData = convertChildrenToData;
9
+
10
+ var React = _interopRequireWildcard(require("react"));
11
+
12
+ var _toArray = _interopRequireDefault(require("rc-util/lib/Children/toArray"));
13
+
14
+ var _excluded = ["children", "value"],
15
+ _excluded2 = ["children"];
16
+
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+
19
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
20
+
21
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
22
+
23
+ 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; }
24
+
25
+ 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; }
26
+
27
+ 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; }
28
+
29
+ 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; }
30
+
31
+ 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; }
32
+
33
+ function convertNodeToOption(node) {
34
+ var key = node.key,
35
+ _node$props = node.props,
36
+ children = _node$props.children,
37
+ value = _node$props.value,
38
+ restProps = _objectWithoutProperties(_node$props, _excluded);
39
+
40
+ return _objectSpread({
41
+ key: key,
42
+ value: value !== undefined ? value : key,
43
+ children: children
44
+ }, restProps);
45
+ }
46
+
47
+ function convertChildrenToData(nodes) {
48
+ var optionOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
49
+ return (0, _toArray.default)(nodes).map(function (node, index) {
50
+ if (! /*#__PURE__*/React.isValidElement(node) || !node.type) {
51
+ return null;
52
+ }
53
+
54
+ var isSelectOptGroup = node.type.isSelectOptGroup,
55
+ key = node.key,
56
+ _node$props2 = node.props,
57
+ children = _node$props2.children,
58
+ restProps = _objectWithoutProperties(_node$props2, _excluded2);
59
+
60
+ if (optionOnly || !isSelectOptGroup) {
61
+ return convertNodeToOption(node);
62
+ }
63
+
64
+ return _objectSpread(_objectSpread({
65
+ key: "__RC_SELECT_GRP__".concat(key === null ? index : key, "__"),
66
+ label: key
67
+ }, restProps), {}, {
68
+ options: convertChildrenToData(children)
69
+ });
70
+ }).filter(function (data) {
71
+ return data;
72
+ });
73
+ }
@@ -0,0 +1 @@
1
+ export declare function isPlatformMac(): boolean;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isPlatformMac = isPlatformMac;
7
+
8
+ /* istanbul ignore file */
9
+ function isPlatformMac() {
10
+ return /(mac\sos|macintosh)/i.test(navigator.appVersion);
11
+ }
@@ -0,0 +1,22 @@
1
+ import type { BaseOptionType, DefaultOptionType } from '../Select';
2
+ import type { FieldNames } from '../Select';
3
+ import type { FlattenOptionData } from '../interface';
4
+ export declare function fillFieldNames(fieldNames: FieldNames | undefined, childrenAsData: boolean): {
5
+ label: string;
6
+ value: string;
7
+ options: string;
8
+ };
9
+ /**
10
+ * Flat options into flatten list.
11
+ * We use `optionOnly` here is aim to avoid user use nested option group.
12
+ * Here is simply set `key` to the index if not provided.
13
+ */
14
+ export declare function flattenOptions<OptionType extends BaseOptionType = DefaultOptionType>(options: OptionType[], { fieldNames, childrenAsData }?: {
15
+ fieldNames?: FieldNames;
16
+ childrenAsData?: boolean;
17
+ }): FlattenOptionData<OptionType>[];
18
+ /**
19
+ * Inject `props` into `option` for legacy usage
20
+ */
21
+ export declare function injectPropsWithOption<T>(option: T): T;
22
+ export declare function getSeparatedContent(text: string, tokens: string[]): string[];
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.fillFieldNames = fillFieldNames;
7
+ exports.flattenOptions = flattenOptions;
8
+ exports.getSeparatedContent = getSeparatedContent;
9
+ exports.injectPropsWithOption = injectPropsWithOption;
10
+
11
+ var _warning = _interopRequireDefault(require("rc-util/lib/warning"));
12
+
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+
15
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
16
+
17
+ 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."); }
18
+
19
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
20
+
21
+ function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
22
+
23
+ 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."); }
24
+
25
+ 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); }
26
+
27
+ 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; }
28
+
29
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
30
+
31
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
32
+
33
+ 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; }
34
+
35
+ 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; }
36
+
37
+ 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; }
38
+
39
+ function getKey(data, index) {
40
+ var key = data.key;
41
+ var value;
42
+
43
+ if ('value' in data) {
44
+ value = data.value;
45
+ }
46
+
47
+ if (key !== null && key !== undefined) {
48
+ return key;
49
+ }
50
+
51
+ if (value !== undefined) {
52
+ return value;
53
+ }
54
+
55
+ return "rc-index-key-".concat(index);
56
+ }
57
+
58
+ function fillFieldNames(fieldNames, childrenAsData) {
59
+ var _ref = fieldNames || {},
60
+ label = _ref.label,
61
+ value = _ref.value,
62
+ options = _ref.options;
63
+
64
+ return {
65
+ label: label || (childrenAsData ? 'children' : 'label'),
66
+ value: value || 'value',
67
+ options: options || 'options'
68
+ };
69
+ }
70
+ /**
71
+ * Flat options into flatten list.
72
+ * We use `optionOnly` here is aim to avoid user use nested option group.
73
+ * Here is simply set `key` to the index if not provided.
74
+ */
75
+
76
+
77
+ function flattenOptions(options) {
78
+ var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
79
+ fieldNames = _ref2.fieldNames,
80
+ childrenAsData = _ref2.childrenAsData;
81
+
82
+ var flattenList = [];
83
+
84
+ var _fillFieldNames = fillFieldNames(fieldNames, false),
85
+ fieldLabel = _fillFieldNames.label,
86
+ fieldValue = _fillFieldNames.value,
87
+ fieldOptions = _fillFieldNames.options;
88
+
89
+ function dig(list, isGroupOption) {
90
+ list.forEach(function (data) {
91
+ var label = data[fieldLabel];
92
+
93
+ if (isGroupOption || !(fieldOptions in data)) {
94
+ var value = data[fieldValue]; // Option
95
+
96
+ flattenList.push({
97
+ key: getKey(data, flattenList.length),
98
+ groupOption: isGroupOption,
99
+ data: data,
100
+ label: label,
101
+ value: value
102
+ });
103
+ } else {
104
+ var grpLabel = label;
105
+
106
+ if (grpLabel === undefined && childrenAsData) {
107
+ grpLabel = data.label;
108
+ } // Option Group
109
+
110
+
111
+ flattenList.push({
112
+ key: getKey(data, flattenList.length),
113
+ group: true,
114
+ data: data,
115
+ label: grpLabel
116
+ });
117
+ dig(data[fieldOptions], true);
118
+ }
119
+ });
120
+ }
121
+
122
+ dig(options, false);
123
+ return flattenList;
124
+ }
125
+ /**
126
+ * Inject `props` into `option` for legacy usage
127
+ */
128
+
129
+
130
+ function injectPropsWithOption(option) {
131
+ var newOption = _objectSpread({}, option);
132
+
133
+ if (!('props' in newOption)) {
134
+ Object.defineProperty(newOption, 'props', {
135
+ get: function get() {
136
+ (0, _warning.default)(false, 'Return type is option instead of Option instance. Please read value directly instead of reading from `props`.');
137
+ return newOption;
138
+ }
139
+ });
140
+ }
141
+
142
+ return newOption;
143
+ }
144
+
145
+ function getSeparatedContent(text, tokens) {
146
+ if (!tokens || !tokens.length) {
147
+ return null;
148
+ }
149
+
150
+ var match = false;
151
+
152
+ function separate(str, _ref3) {
153
+ var _ref4 = _toArray(_ref3),
154
+ token = _ref4[0],
155
+ restTokens = _ref4.slice(1);
156
+
157
+ if (!token) {
158
+ return [str];
159
+ }
160
+
161
+ var list = str.split(token);
162
+ match = match || list.length > 1;
163
+ return list.reduce(function (prevList, unitStr) {
164
+ return [].concat(_toConsumableArray(prevList), _toConsumableArray(separate(unitStr, restTokens)));
165
+ }, []).filter(function (unit) {
166
+ return unit;
167
+ });
168
+ }
169
+
170
+ var list = separate(text, tokens);
171
+ return match ? list : null;
172
+ }
@@ -0,0 +1,3 @@
1
+ import type { SelectProps } from '../Select';
2
+ declare function warningProps(props: SelectProps): void;
3
+ export default warningProps;
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var React = _interopRequireWildcard(require("react"));
9
+
10
+ var _warning = _interopRequireWildcard(require("rc-util/lib/warning"));
11
+
12
+ var _toArray = _interopRequireDefault(require("rc-util/lib/Children/toArray"));
13
+
14
+ var _legacyUtil = require("./legacyUtil");
15
+
16
+ var _commonUtil = require("./commonUtil");
17
+
18
+ var _BaseSelect = require("../BaseSelect");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
26
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
27
+
28
+ function warningProps(props) {
29
+ var mode = props.mode,
30
+ options = props.options,
31
+ children = props.children,
32
+ backfill = props.backfill,
33
+ allowClear = props.allowClear,
34
+ placeholder = props.placeholder,
35
+ getInputElement = props.getInputElement,
36
+ showSearch = props.showSearch,
37
+ onSearch = props.onSearch,
38
+ defaultOpen = props.defaultOpen,
39
+ autoFocus = props.autoFocus,
40
+ labelInValue = props.labelInValue,
41
+ value = props.value,
42
+ inputValue = props.inputValue,
43
+ optionLabelProp = props.optionLabelProp;
44
+ var multiple = (0, _BaseSelect.isMultiple)(mode);
45
+ var mergedShowSearch = showSearch !== undefined ? showSearch : multiple || mode === 'combobox';
46
+ var mergedOptions = options || (0, _legacyUtil.convertChildrenToData)(children); // `tags` should not set option as disabled
47
+
48
+ (0, _warning.default)(mode !== 'tags' || mergedOptions.every(function (opt) {
49
+ return !opt.disabled;
50
+ }), 'Please avoid setting option to disabled in tags mode since user can always type text as tag.'); // `combobox` & `tags` should option be `string` type
51
+
52
+ if (mode === 'tags' || mode === 'combobox') {
53
+ var hasNumberValue = mergedOptions.some(function (item) {
54
+ if (item.options) {
55
+ return item.options.some(function (opt) {
56
+ return typeof ('value' in opt ? opt.value : opt.key) === 'number';
57
+ });
58
+ }
59
+
60
+ return typeof ('value' in item ? item.value : item.key) === 'number';
61
+ });
62
+ (0, _warning.default)(!hasNumberValue, '`value` of Option should not use number type when `mode` is `tags` or `combobox`.');
63
+ } // `combobox` should not use `optionLabelProp`
64
+
65
+
66
+ (0, _warning.default)(mode !== 'combobox' || !optionLabelProp, '`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly.'); // Only `combobox` support `backfill`
67
+
68
+ (0, _warning.default)(mode === 'combobox' || !backfill, '`backfill` only works with `combobox` mode.'); // Only `combobox` support `getInputElement`
69
+
70
+ (0, _warning.default)(mode === 'combobox' || !getInputElement, '`getInputElement` only work with `combobox` mode.'); // Customize `getInputElement` should not use `allowClear` & `placeholder`
71
+
72
+ (0, _warning.noteOnce)(mode !== 'combobox' || !getInputElement || !allowClear || !placeholder, 'Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`.'); // `onSearch` should use in `combobox` or `showSearch`
73
+
74
+ if (onSearch && !mergedShowSearch && mode !== 'combobox' && mode !== 'tags') {
75
+ (0, _warning.default)(false, '`onSearch` should work with `showSearch` instead of use alone.');
76
+ }
77
+
78
+ (0, _warning.noteOnce)(!defaultOpen || autoFocus, '`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed.');
79
+
80
+ if (value !== undefined && value !== null) {
81
+ var values = (0, _commonUtil.toArray)(value);
82
+ (0, _warning.default)(!labelInValue || values.every(function (val) {
83
+ return _typeof(val) === 'object' && ('key' in val || 'value' in val);
84
+ }), '`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`');
85
+ (0, _warning.default)(!multiple || Array.isArray(value), '`value` should be array when `mode` is `multiple` or `tags`');
86
+ } // Syntactic sugar should use correct children type
87
+
88
+
89
+ if (children) {
90
+ var invalidateChildType = null;
91
+ (0, _toArray.default)(children).some(function (node) {
92
+ if (! /*#__PURE__*/React.isValidElement(node) || !node.type) {
93
+ return false;
94
+ }
95
+
96
+ var type = node.type;
97
+
98
+ if (type.isSelectOption) {
99
+ return false;
100
+ }
101
+
102
+ if (type.isSelectOptGroup) {
103
+ var allChildrenValid = (0, _toArray.default)(node.props.children).every(function (subNode) {
104
+ if (! /*#__PURE__*/React.isValidElement(subNode) || !node.type || subNode.type.isSelectOption) {
105
+ return true;
106
+ }
107
+
108
+ invalidateChildType = subNode.type;
109
+ return false;
110
+ });
111
+
112
+ if (allChildrenValid) {
113
+ return false;
114
+ }
115
+
116
+ return true;
117
+ }
118
+
119
+ invalidateChildType = type;
120
+ return true;
121
+ });
122
+
123
+ if (invalidateChildType) {
124
+ (0, _warning.default)(false, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(invalidateChildType.displayName || invalidateChildType.name || invalidateChildType, "`."));
125
+ }
126
+
127
+ (0, _warning.default)(inputValue === undefined, '`inputValue` is deprecated, please use `searchValue` instead.');
128
+ }
129
+ }
130
+
131
+ var _default = warningProps;
132
+ exports.default = _default;
@@ -1,2 +1,3 @@
1
+ import '../../Empty/style';
1
2
  import '../../style';
2
3
  import './index.less';
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ require("../../Empty/style");
4
+
3
5
  require("../../style");
4
6
 
5
7
  require("./index.less");