tntd 2.6.7 → 2.7.1

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 (810) hide show
  1. package/es/_util/colors.js +3 -0
  2. package/es/_util/colors.js.map +1 -0
  3. package/es/_util/easings.js +9 -0
  4. package/es/_util/easings.js.map +1 -0
  5. package/es/_util/getDataOrAriaProps.js +8 -0
  6. package/es/_util/getDataOrAriaProps.js.map +1 -0
  7. package/es/_util/getScroll.js +14 -0
  8. package/es/_util/getScroll.js.map +1 -0
  9. package/es/_util/interopDefault.js +5 -0
  10. package/es/_util/interopDefault.js.map +1 -0
  11. package/es/_util/isNumeric.js +4 -0
  12. package/es/_util/isNumeric.js.map +1 -0
  13. package/es/_util/motion.js +22 -0
  14. package/es/_util/motion.js.map +1 -0
  15. package/es/_util/openAnimation.js +51 -0
  16. package/es/_util/openAnimation.js.map +1 -0
  17. package/es/_util/raf.js +25 -0
  18. package/es/_util/raf.js.map +1 -0
  19. package/es/_util/reactNode.js +6 -0
  20. package/es/_util/reactNode.js.map +1 -0
  21. package/es/_util/ref.js +15 -0
  22. package/es/_util/ref.js.map +1 -0
  23. package/es/_util/responsiveObserve.js +82 -0
  24. package/es/_util/responsiveObserve.js.map +1 -0
  25. package/es/_util/scrollTo.js +29 -0
  26. package/es/_util/scrollTo.js.map +1 -0
  27. package/es/_util/styleChecker.js +12 -0
  28. package/es/_util/styleChecker.js.map +1 -0
  29. package/es/_util/throttleByAnimationFrame.js +40 -0
  30. package/es/_util/throttleByAnimationFrame.js.map +1 -0
  31. package/es/_util/transButton.js +103 -0
  32. package/es/_util/transButton.js.map +1 -0
  33. package/es/_util/triggerEvent.js +8 -0
  34. package/es/_util/triggerEvent.js.map +1 -0
  35. package/es/_util/type.js +3 -0
  36. package/es/_util/type.js.map +1 -0
  37. package/es/_util/warning.js +5 -0
  38. package/es/_util/warning.js.map +1 -0
  39. package/es/_util/wave.js +228 -0
  40. package/es/_util/wave.js.map +1 -0
  41. package/es/affix/index.js +1 -2
  42. package/es/alert/index.js +1 -2
  43. package/es/anchor/index.js +1 -2
  44. package/es/array-input/icon.js +24 -6
  45. package/es/array-input/index.js +203 -119
  46. package/es/auth-context/index.js +1 -2
  47. package/es/auto-complete/index.js +1 -2
  48. package/es/avatar/index.js +1 -2
  49. package/es/back-top/index.js +1 -2
  50. package/es/badge/index.js +1 -2
  51. package/es/breadcrumb/index.js +1 -2
  52. package/es/button/index.js +1 -2
  53. package/es/calendar/index.js +1 -2
  54. package/es/card/index.js +1 -2
  55. package/es/carousel/index.js +1 -2
  56. package/es/cascader/index.js +6 -3
  57. package/es/cascader/index.js.map +1 -1
  58. package/es/checkbox/checkbox-group.js +5 -0
  59. package/es/checkbox/checkbox-group.js.map +1 -0
  60. package/es/checkbox/index.js +6 -2
  61. package/es/checkbox/index.js.map +1 -1
  62. package/es/col/index.js +1 -2
  63. package/es/collapse/index.js +1 -2
  64. package/es/color-picker/ColorPicker.js +126 -80
  65. package/es/color-picker/index.js +8 -5
  66. package/es/columns/index.js +66 -30
  67. package/es/columns/style/index.js +1 -2
  68. package/es/comment/index.js +1 -2
  69. package/es/config-provider/DisabledContext.js +12 -0
  70. package/es/config-provider/DisabledContext.js.map +1 -0
  71. package/es/config-provider/SizeContext.js +9 -0
  72. package/es/config-provider/SizeContext.js.map +1 -0
  73. package/es/config-provider/config-provider.js +1 -2
  74. package/es/config-provider/context.js +41 -0
  75. package/es/config-provider/context.js.map +1 -0
  76. package/es/config-provider/index.js +4 -0
  77. package/es/config-provider/index.js.map +1 -1
  78. package/es/connect/index.js +26 -0
  79. package/es/connect/index.js.map +1 -0
  80. package/es/date-picker/index.js +11 -1
  81. package/es/date-picker/index.js.map +1 -1
  82. package/es/input/input.js +37 -25
  83. package/es/input/input.js.map +1 -1
  84. package/es/input-number/index.js +3 -1
  85. package/es/input-number/index.js.map +1 -1
  86. package/es/preview-text/index.js +195 -0
  87. package/es/preview-text/index.js.map +1 -0
  88. package/es/preview-text/index.less +3 -0
  89. package/es/query-form/index.js.map +1 -1
  90. package/es/radio/index.js +3 -0
  91. package/es/radio/index.js.map +1 -1
  92. package/es/radio/radio-group.js +6 -0
  93. package/es/radio/radio-group.js.map +1 -0
  94. package/es/select/index.js.map +1 -1
  95. package/es/select/select.js +17 -5
  96. package/es/select/select.js.map +1 -1
  97. package/es/switch/index.js +2 -3
  98. package/es/switch/index.js.map +1 -1
  99. package/es/switch/switch.js +9 -0
  100. package/es/switch/switch.js.map +1 -0
  101. package/es/time-picker/index.js +3 -1
  102. package/es/time-picker/index.js.map +1 -1
  103. package/es/tntd-form/ErrorList.js +53 -0
  104. package/es/tntd-form/ErrorList.js.map +1 -0
  105. package/es/tntd-form/Form.js +101 -0
  106. package/es/tntd-form/Form.js.map +1 -0
  107. package/es/tntd-form/FormItem/ItemHolder.js +135 -0
  108. package/es/tntd-form/FormItem/ItemHolder.js.map +1 -0
  109. package/es/tntd-form/FormItem/index.js +238 -0
  110. package/es/tntd-form/FormItem/index.js.map +1 -0
  111. package/es/tntd-form/FormItemInput.js +38 -0
  112. package/es/tntd-form/FormItemInput.js.map +1 -0
  113. package/es/tntd-form/FormItemLabel.js +73 -0
  114. package/es/tntd-form/FormItemLabel.js.map +1 -0
  115. package/es/tntd-form/FormList.js +34 -0
  116. package/es/tntd-form/FormList.js.map +1 -0
  117. package/es/tntd-form/TntdForm/components/ItemComp.js +2 -2
  118. package/es/tntd-form/TntdForm/components/ItemComp.js.map +1 -1
  119. package/es/tntd-form/__tests__/demo-extend.test.js +3 -0
  120. package/es/tntd-form/__tests__/demo-extend.test.js.map +1 -0
  121. package/es/tntd-form/__tests__/demo.test.js +3 -0
  122. package/es/tntd-form/__tests__/demo.test.js.map +1 -0
  123. package/es/tntd-form/__tests__/image.test.js +5 -0
  124. package/es/tntd-form/__tests__/image.test.js.map +1 -0
  125. package/es/tntd-form/__tests__/index.test.js +957 -0
  126. package/es/tntd-form/__tests__/index.test.js.map +1 -0
  127. package/es/tntd-form/__tests__/list-noStyle.test.js +41 -0
  128. package/es/tntd-form/__tests__/list-noStyle.test.js.map +1 -0
  129. package/es/tntd-form/__tests__/list.test.js +164 -0
  130. package/es/tntd-form/__tests__/list.test.js.map +1 -0
  131. package/es/tntd-form/__tests__/ref.test.js +45 -0
  132. package/es/tntd-form/__tests__/ref.test.js.map +1 -0
  133. package/es/tntd-form/__tests__/type.test.js +74 -0
  134. package/es/tntd-form/__tests__/type.test.js.map +1 -0
  135. package/es/tntd-form/_util/motion.js +38 -0
  136. package/es/tntd-form/_util/motion.js.map +1 -0
  137. package/es/tntd-form/_util/reactNode.js +15 -0
  138. package/es/tntd-form/_util/reactNode.js.map +1 -0
  139. package/es/tntd-form/_util/scrollTo.js +35 -0
  140. package/es/tntd-form/_util/scrollTo.js.map +1 -0
  141. package/es/tntd-form/_util/type.js +4 -0
  142. package/es/tntd-form/_util/type.js.map +1 -0
  143. package/es/tntd-form/_util/warning.js +6 -0
  144. package/es/tntd-form/_util/warning.js.map +1 -0
  145. package/es/tntd-form/_util/wave.js +168 -0
  146. package/es/tntd-form/_util/wave.js.map +1 -0
  147. package/es/tntd-form/context.js +35 -0
  148. package/es/tntd-form/context.js.map +1 -0
  149. package/es/tntd-form/hooks/useDebounce.js +14 -0
  150. package/es/tntd-form/hooks/useDebounce.js.map +1 -0
  151. package/es/tntd-form/hooks/useForm.js +35 -0
  152. package/es/tntd-form/hooks/useForm.js.map +1 -0
  153. package/es/tntd-form/hooks/useFormInstance.js +7 -0
  154. package/es/tntd-form/hooks/useFormInstance.js.map +1 -0
  155. package/es/tntd-form/hooks/useFormItemStatus.js +10 -0
  156. package/es/tntd-form/hooks/useFormItemStatus.js.map +1 -0
  157. package/es/tntd-form/hooks/useFrameState.js +38 -0
  158. package/es/tntd-form/hooks/useFrameState.js.map +1 -0
  159. package/es/tntd-form/hooks/useItemRef.js +19 -0
  160. package/es/tntd-form/hooks/useItemRef.js.map +1 -0
  161. package/es/tntd-form/index.js +17 -1
  162. package/es/tntd-form/index.js.map +1 -1
  163. package/es/tntd-form/interface.js +3 -0
  164. package/es/tntd-form/interface.js.map +1 -0
  165. package/es/tntd-form/style/components.less +16 -0
  166. package/es/tntd-form/style/horizontal.less +26 -0
  167. package/es/tntd-form/style/index.js +6 -0
  168. package/es/tntd-form/style/index.js.map +1 -0
  169. package/es/tntd-form/style/index.less +342 -0
  170. package/es/tntd-form/style/inline.less +40 -0
  171. package/es/tntd-form/style/mixin.less +90 -0
  172. package/es/tntd-form/style/rtl.less +204 -0
  173. package/es/tntd-form/style/status.less +45 -0
  174. package/es/tntd-form/style/vertical.less +95 -0
  175. package/es/tntd-form/tntd-form.stories.js +426 -0
  176. package/es/tntd-form/tntd-form.stories.js.map +1 -0
  177. package/es/tntd-form/util.js +21 -0
  178. package/es/tntd-form/util.js.map +1 -0
  179. package/es/tntd-form/validateMessagesContext.js +6 -0
  180. package/es/tntd-form/validateMessagesContext.js.map +1 -0
  181. package/es/tree-select/index.js +4 -1
  182. package/es/tree-select/index.js.map +1 -1
  183. package/es/upload/index.js +6 -1
  184. package/es/upload/index.js.map +1 -1
  185. package/lib/_util/colors.d.ts +3 -0
  186. package/lib/_util/colors.d.ts.map +1 -0
  187. package/lib/_util/colors.js +7 -0
  188. package/lib/_util/colors.js.map +1 -0
  189. package/lib/_util/easings.d.ts +2 -0
  190. package/lib/_util/easings.d.ts.map +1 -0
  191. package/lib/_util/easings.js +14 -0
  192. package/lib/_util/easings.js.map +1 -0
  193. package/lib/_util/getDataOrAriaProps.d.ts +2 -0
  194. package/lib/_util/getDataOrAriaProps.d.ts.map +1 -0
  195. package/lib/_util/getDataOrAriaProps.js +13 -0
  196. package/lib/_util/getDataOrAriaProps.js.map +1 -0
  197. package/lib/_util/getScroll.d.ts +2 -0
  198. package/lib/_util/getScroll.d.ts.map +1 -0
  199. package/lib/_util/getScroll.js +18 -0
  200. package/lib/_util/getScroll.js.map +1 -0
  201. package/lib/_util/interopDefault.d.ts +2 -0
  202. package/lib/_util/interopDefault.d.ts.map +1 -0
  203. package/lib/_util/interopDefault.js +9 -0
  204. package/lib/_util/interopDefault.js.map +1 -0
  205. package/lib/_util/isNumeric.d.ts +3 -0
  206. package/lib/_util/isNumeric.d.ts.map +1 -0
  207. package/lib/_util/isNumeric.js +7 -0
  208. package/lib/_util/isNumeric.js.map +1 -0
  209. package/lib/_util/motion.d.ts +24 -0
  210. package/lib/_util/motion.d.ts.map +1 -0
  211. package/lib/_util/motion.js +17 -0
  212. package/lib/_util/motion.js.map +1 -0
  213. package/lib/_util/openAnimation.d.ts +7 -0
  214. package/lib/_util/openAnimation.d.ts.map +1 -0
  215. package/lib/_util/openAnimation.js +58 -0
  216. package/lib/_util/openAnimation.js.map +1 -0
  217. package/lib/_util/raf.d.ts +10 -0
  218. package/lib/_util/raf.d.ts.map +1 -0
  219. package/lib/_util/raf.js +34 -0
  220. package/lib/_util/raf.js.map +1 -0
  221. package/lib/_util/reactNode.d.ts +3 -0
  222. package/lib/_util/reactNode.d.ts.map +1 -0
  223. package/lib/_util/reactNode.js +31 -0
  224. package/lib/_util/reactNode.js.map +1 -0
  225. package/lib/_util/ref.d.ts +4 -0
  226. package/lib/_util/ref.d.ts.map +1 -0
  227. package/lib/_util/ref.js +22 -0
  228. package/lib/_util/ref.js.map +1 -0
  229. package/lib/_util/responsiveObserve.d.ts +14 -0
  230. package/lib/_util/responsiveObserve.d.ts.map +1 -0
  231. package/lib/_util/responsiveObserve.js +83 -0
  232. package/lib/_util/responsiveObserve.js.map +1 -0
  233. package/lib/_util/scrollTo.d.ts +11 -0
  234. package/lib/_util/scrollTo.d.ts.map +1 -0
  235. package/lib/_util/scrollTo.js +34 -0
  236. package/lib/_util/scrollTo.js.map +1 -0
  237. package/lib/_util/styleChecker.d.ts +4 -0
  238. package/lib/_util/styleChecker.d.ts.map +1 -0
  239. package/lib/_util/styleChecker.js +14 -0
  240. package/lib/_util/styleChecker.js.map +1 -0
  241. package/lib/_util/throttleByAnimationFrame.d.ts +6 -0
  242. package/lib/_util/throttleByAnimationFrame.d.ts.map +1 -0
  243. package/lib/_util/throttleByAnimationFrame.js +49 -0
  244. package/lib/_util/throttleByAnimationFrame.js.map +1 -0
  245. package/lib/_util/transButton.d.ts +21 -0
  246. package/lib/_util/transButton.d.ts.map +1 -0
  247. package/lib/_util/transButton.js +112 -0
  248. package/lib/_util/transButton.js.map +1 -0
  249. package/lib/_util/triggerEvent.d.ts +2 -0
  250. package/lib/_util/triggerEvent.d.ts.map +1 -0
  251. package/lib/_util/triggerEvent.js +12 -0
  252. package/lib/_util/triggerEvent.js.map +1 -0
  253. package/lib/_util/type.d.ts +4 -0
  254. package/lib/_util/type.d.ts.map +1 -0
  255. package/lib/_util/type.js +9 -0
  256. package/lib/_util/type.js.map +1 -0
  257. package/lib/_util/warning.d.ts +5 -0
  258. package/lib/_util/warning.d.ts.map +1 -0
  259. package/lib/_util/warning.js +28 -0
  260. package/lib/_util/warning.js.map +1 -0
  261. package/lib/_util/wave.d.ts +26 -0
  262. package/lib/_util/wave.d.ts.map +1 -0
  263. package/lib/_util/wave.js +249 -0
  264. package/lib/_util/wave.js.map +1 -0
  265. package/lib/affix/index.js +5 -1
  266. package/lib/affix/index.js.map +1 -1
  267. package/lib/alert/index.js +5 -1
  268. package/lib/alert/index.js.map +1 -1
  269. package/lib/anchor/index.js +5 -1
  270. package/lib/anchor/index.js.map +1 -1
  271. package/lib/array-input/index.js +5 -1
  272. package/lib/array-input/index.js.map +1 -1
  273. package/lib/auto-complete/index.js +5 -1
  274. package/lib/auto-complete/index.js.map +1 -1
  275. package/lib/avatar/index.js +5 -1
  276. package/lib/avatar/index.js.map +1 -1
  277. package/lib/back-top/index.js +5 -1
  278. package/lib/back-top/index.js.map +1 -1
  279. package/lib/badge/index.js +5 -1
  280. package/lib/badge/index.js.map +1 -1
  281. package/lib/breadcrumb/index.js +5 -1
  282. package/lib/breadcrumb/index.js.map +1 -1
  283. package/lib/button/index.js +5 -1
  284. package/lib/button/index.js.map +1 -1
  285. package/lib/calendar/index.js +5 -1
  286. package/lib/calendar/index.js.map +1 -1
  287. package/lib/card/index.js +5 -1
  288. package/lib/card/index.js.map +1 -1
  289. package/lib/carousel/index.js +5 -1
  290. package/lib/carousel/index.js.map +1 -1
  291. package/lib/cascader/index.d.ts +6 -1
  292. package/lib/cascader/index.d.ts.map +1 -1
  293. package/lib/cascader/index.js +11 -2
  294. package/lib/cascader/index.js.map +1 -1
  295. package/lib/checkbox/checkbox-group.d.ts +8 -0
  296. package/lib/checkbox/checkbox-group.d.ts.map +1 -0
  297. package/lib/checkbox/checkbox-group.js +11 -0
  298. package/lib/checkbox/checkbox-group.js.map +1 -0
  299. package/lib/checkbox/index.d.ts +1 -0
  300. package/lib/checkbox/index.d.ts.map +1 -1
  301. package/lib/checkbox/index.js +10 -1
  302. package/lib/checkbox/index.js.map +1 -1
  303. package/lib/col/index.js +5 -1
  304. package/lib/col/index.js.map +1 -1
  305. package/lib/collapse/index.js +5 -1
  306. package/lib/collapse/index.js.map +1 -1
  307. package/lib/color-picker/ColorPicker.js +5 -1
  308. package/lib/color-picker/ColorPicker.js.map +1 -1
  309. package/lib/comment/index.js +5 -1
  310. package/lib/comment/index.js.map +1 -1
  311. package/lib/config-provider/DisabledContext.d.ts +10 -0
  312. package/lib/config-provider/DisabledContext.d.ts.map +1 -0
  313. package/lib/config-provider/DisabledContext.js +35 -0
  314. package/lib/config-provider/DisabledContext.js.map +1 -0
  315. package/lib/config-provider/SizeContext.d.ts +10 -0
  316. package/lib/config-provider/SizeContext.d.ts.map +1 -0
  317. package/lib/config-provider/SizeContext.js +32 -0
  318. package/lib/config-provider/SizeContext.js.map +1 -0
  319. package/lib/config-provider/context.d.ts +61 -0
  320. package/lib/config-provider/context.d.ts.map +1 -0
  321. package/lib/config-provider/context.js +64 -0
  322. package/lib/config-provider/context.js.map +1 -0
  323. package/lib/config-provider/index.d.ts +1 -0
  324. package/lib/config-provider/index.d.ts.map +1 -1
  325. package/lib/config-provider/index.js +9 -1
  326. package/lib/config-provider/index.js.map +1 -1
  327. package/lib/connect/index.d.ts +12 -0
  328. package/lib/connect/index.d.ts.map +1 -0
  329. package/lib/connect/index.js +32 -0
  330. package/lib/connect/index.js.map +1 -0
  331. package/lib/date-picker/index.d.ts +6 -1
  332. package/lib/date-picker/index.d.ts.map +1 -1
  333. package/lib/date-picker/index.js +17 -2
  334. package/lib/date-picker/index.js.map +1 -1
  335. package/lib/descriptions/descriptions.d.ts +1 -1
  336. package/lib/descriptions/descriptions.d.ts.map +1 -1
  337. package/lib/descriptions/descriptions.js +5 -1
  338. package/lib/descriptions/descriptions.js.map +1 -1
  339. package/lib/descriptions/index.js +5 -1
  340. package/lib/descriptions/index.js.map +1 -1
  341. package/lib/development-login/LoginModal.js +5 -1
  342. package/lib/development-login/LoginModal.js.map +1 -1
  343. package/lib/development-login/index.js +5 -1
  344. package/lib/development-login/index.js.map +1 -1
  345. package/lib/divider/index.js +5 -1
  346. package/lib/divider/index.js.map +1 -1
  347. package/lib/drawer/index.js +5 -1
  348. package/lib/drawer/index.js.map +1 -1
  349. package/lib/dropdown/index.js +5 -1
  350. package/lib/dropdown/index.js.map +1 -1
  351. package/lib/ellipsis/index.js +5 -1
  352. package/lib/ellipsis/index.js.map +1 -1
  353. package/lib/empty/empty.js +5 -1
  354. package/lib/empty/empty.js.map +1 -1
  355. package/lib/empty/index.js +5 -1
  356. package/lib/empty/index.js.map +1 -1
  357. package/lib/exception/index.js +5 -1
  358. package/lib/exception/index.js.map +1 -1
  359. package/lib/form/index.js +5 -1
  360. package/lib/form/index.js.map +1 -1
  361. package/lib/handle/index.js +5 -1
  362. package/lib/handle/index.js.map +1 -1
  363. package/lib/icon/index.js +5 -1
  364. package/lib/icon/index.js.map +1 -1
  365. package/lib/img/index.js +5 -1
  366. package/lib/img/index.js.map +1 -1
  367. package/lib/input/index.js +5 -1
  368. package/lib/input/index.js.map +1 -1
  369. package/lib/input/input.d.ts +22 -8
  370. package/lib/input/input.d.ts.map +1 -1
  371. package/lib/input/input.js +61 -27
  372. package/lib/input/input.js.map +1 -1
  373. package/lib/input-number/index.d.ts +7 -2
  374. package/lib/input-number/index.d.ts.map +1 -1
  375. package/lib/input-number/index.js +8 -2
  376. package/lib/input-number/index.js.map +1 -1
  377. package/lib/label/index.js +5 -1
  378. package/lib/label/index.js.map +1 -1
  379. package/lib/layout/index.js +5 -1
  380. package/lib/layout/index.js.map +1 -1
  381. package/lib/list/index.js +5 -1
  382. package/lib/list/index.js.map +1 -1
  383. package/lib/loading-button/index.js +5 -1
  384. package/lib/loading-button/index.js.map +1 -1
  385. package/lib/locale/index.js +5 -1
  386. package/lib/locale/index.js.map +1 -1
  387. package/lib/locale-provider/index.js +5 -1
  388. package/lib/locale-provider/index.js.map +1 -1
  389. package/lib/mentions/index.js +5 -1
  390. package/lib/mentions/index.js.map +1 -1
  391. package/lib/menu/index.js +5 -1
  392. package/lib/menu/index.js.map +1 -1
  393. package/lib/message/index.js +5 -1
  394. package/lib/message/index.js.map +1 -1
  395. package/lib/modal/index.js +5 -1
  396. package/lib/modal/index.js.map +1 -1
  397. package/lib/modal/modal.js +5 -1
  398. package/lib/modal/modal.js.map +1 -1
  399. package/lib/notification/index.js +5 -1
  400. package/lib/notification/index.js.map +1 -1
  401. package/lib/page-header/index.js +5 -1
  402. package/lib/page-header/index.js.map +1 -1
  403. package/lib/pagination/index.js +5 -1
  404. package/lib/pagination/index.js.map +1 -1
  405. package/lib/popconfirm/index.js +5 -1
  406. package/lib/popconfirm/index.js.map +1 -1
  407. package/lib/popover/index.js +5 -1
  408. package/lib/popover/index.js.map +1 -1
  409. package/lib/preview-text/index.d.ts +20 -0
  410. package/lib/preview-text/index.d.ts.map +1 -0
  411. package/lib/preview-text/index.js +224 -0
  412. package/lib/preview-text/index.js.map +1 -0
  413. package/lib/preview-text/index.less +3 -0
  414. package/lib/progress/index.js +5 -1
  415. package/lib/progress/index.js.map +1 -1
  416. package/lib/query-form/Field/Select.js +5 -1
  417. package/lib/query-form/Field/Select.js.map +1 -1
  418. package/lib/query-form/Field/SelectInput.js +5 -1
  419. package/lib/query-form/Field/SelectInput.js.map +1 -1
  420. package/lib/query-form/Field/fieldsMap.d.ts +2 -2
  421. package/lib/query-form/Field/index.d.ts +6 -0
  422. package/lib/query-form/Field/index.d.ts.map +1 -1
  423. package/lib/query-form/Field/index.js +5 -1
  424. package/lib/query-form/Field/index.js.map +1 -1
  425. package/lib/query-form/index.d.ts +9 -0
  426. package/lib/query-form/index.d.ts.map +1 -1
  427. package/lib/query-form/index.js +5 -1
  428. package/lib/query-form/index.js.map +1 -1
  429. package/lib/query-list-scene/List.d.ts +13 -0
  430. package/lib/query-list-scene/List.d.ts.map +1 -1
  431. package/lib/query-list-scene/List.js +5 -1
  432. package/lib/query-list-scene/List.js.map +1 -1
  433. package/lib/query-list-scene/QueryForm.d.ts +3 -0
  434. package/lib/query-list-scene/QueryForm.d.ts.map +1 -1
  435. package/lib/query-list-scene/QueryListScene.d.ts +1 -0
  436. package/lib/query-list-scene/QueryListScene.d.ts.map +1 -1
  437. package/lib/radio/index.d.ts.map +1 -1
  438. package/lib/radio/index.js +8 -1
  439. package/lib/radio/index.js.map +1 -1
  440. package/lib/radio/radio-group.d.ts +8 -0
  441. package/lib/radio/radio-group.d.ts.map +1 -0
  442. package/lib/radio/radio-group.js +11 -0
  443. package/lib/radio/radio-group.js.map +1 -0
  444. package/lib/rate/index.js +5 -1
  445. package/lib/rate/index.js.map +1 -1
  446. package/lib/result/index.js +5 -1
  447. package/lib/result/index.js.map +1 -1
  448. package/lib/row/index.js +5 -1
  449. package/lib/row/index.js.map +1 -1
  450. package/lib/select/index.d.ts +2 -1
  451. package/lib/select/index.d.ts.map +1 -1
  452. package/lib/select/index.js +5 -1
  453. package/lib/select/index.js.map +1 -1
  454. package/lib/select/select.d.ts +20 -6
  455. package/lib/select/select.d.ts.map +1 -1
  456. package/lib/select/select.js +41 -7
  457. package/lib/select/select.js.map +1 -1
  458. package/lib/skeleton/index.js +5 -1
  459. package/lib/skeleton/index.js.map +1 -1
  460. package/lib/slider/index.js +5 -1
  461. package/lib/slider/index.js.map +1 -1
  462. package/lib/spin/index.js +5 -1
  463. package/lib/spin/index.js.map +1 -1
  464. package/lib/statistic/index.js +5 -1
  465. package/lib/statistic/index.js.map +1 -1
  466. package/lib/steps/index.js +5 -1
  467. package/lib/steps/index.js.map +1 -1
  468. package/lib/steps/steps.js +5 -1
  469. package/lib/steps/steps.js.map +1 -1
  470. package/lib/svg-components/illustration-403.d.ts +1 -1
  471. package/lib/svg-components/illustration-403.js +5 -1
  472. package/lib/svg-components/illustration-403.js.map +1 -1
  473. package/lib/svg-components/illustration-404.d.ts +1 -1
  474. package/lib/svg-components/illustration-404.js +5 -1
  475. package/lib/svg-components/illustration-404.js.map +1 -1
  476. package/lib/svg-components/illustration-500.d.ts +1 -1
  477. package/lib/svg-components/illustration-500.js +5 -1
  478. package/lib/svg-components/illustration-500.js.map +1 -1
  479. package/lib/svg-components/illustration-empty.d.ts +1 -1
  480. package/lib/svg-components/illustration-empty.js +5 -1
  481. package/lib/svg-components/illustration-empty.js.map +1 -1
  482. package/lib/svg-components/illustration-failure.d.ts +1 -1
  483. package/lib/svg-components/illustration-failure.js +5 -1
  484. package/lib/svg-components/illustration-failure.js.map +1 -1
  485. package/lib/svg-components/illustration-no-access.d.ts +1 -1
  486. package/lib/svg-components/illustration-no-access.js +5 -1
  487. package/lib/svg-components/illustration-no-access.js.map +1 -1
  488. package/lib/svg-components/illustration-no-chart.d.ts +1 -1
  489. package/lib/svg-components/illustration-no-chart.js +5 -1
  490. package/lib/svg-components/illustration-no-chart.js.map +1 -1
  491. package/lib/svg-components/illustration-no-result.d.ts +1 -1
  492. package/lib/svg-components/illustration-no-result.js +5 -1
  493. package/lib/svg-components/illustration-no-result.js.map +1 -1
  494. package/lib/svg-components/illustration-offline.d.ts +1 -1
  495. package/lib/svg-components/illustration-offline.js +5 -1
  496. package/lib/svg-components/illustration-offline.js.map +1 -1
  497. package/lib/svg-components/illustration-success.d.ts +1 -1
  498. package/lib/svg-components/illustration-success.js +5 -1
  499. package/lib/svg-components/illustration-success.js.map +1 -1
  500. package/lib/switch/index.d.ts +2 -3
  501. package/lib/switch/index.d.ts.map +1 -1
  502. package/lib/switch/index.js +7 -4
  503. package/lib/switch/index.js.map +1 -1
  504. package/lib/switch/switch.d.ts +10 -0
  505. package/lib/switch/switch.d.ts.map +1 -0
  506. package/lib/switch/switch.js +29 -0
  507. package/lib/switch/switch.js.map +1 -0
  508. package/lib/table/assets/image-loading-background.d.ts +1 -1
  509. package/lib/table/assets/image-loading-background.js +5 -1
  510. package/lib/table/assets/image-loading-background.js.map +1 -1
  511. package/lib/table/assets/image-loading.d.ts +1 -1
  512. package/lib/table/assets/image-loading.js +5 -1
  513. package/lib/table/assets/image-loading.js.map +1 -1
  514. package/lib/table/hooks/index.js +5 -1
  515. package/lib/table/hooks/index.js.map +1 -1
  516. package/lib/table/index.js +5 -1
  517. package/lib/table/index.js.map +1 -1
  518. package/lib/table/table.js +5 -1
  519. package/lib/table/table.js.map +1 -1
  520. package/lib/tabs/index.js +5 -1
  521. package/lib/tabs/index.js.map +1 -1
  522. package/lib/tag/index.js +5 -1
  523. package/lib/tag/index.js.map +1 -1
  524. package/lib/time-picker/index.d.ts +7 -2
  525. package/lib/time-picker/index.d.ts.map +1 -1
  526. package/lib/time-picker/index.js +8 -2
  527. package/lib/time-picker/index.js.map +1 -1
  528. package/lib/timeline/index.js +5 -1
  529. package/lib/timeline/index.js.map +1 -1
  530. package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +5 -1
  531. package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js.map +1 -1
  532. package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +5 -1
  533. package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js.map +1 -1
  534. package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +5 -1
  535. package/lib/tntd-cascader/AntdCascader/component/SizeContext.js.map +1 -1
  536. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +5 -1
  537. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js.map +1 -1
  538. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +5 -1
  539. package/lib/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
  540. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +5 -1
  541. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js.map +1 -1
  542. package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +1 -1
  543. package/lib/tntd-cascader/AntdCascader/config/warning.js +5 -1
  544. package/lib/tntd-cascader/AntdCascader/config/warning.js.map +1 -1
  545. package/lib/tntd-cascader/AntdCascader/index.js +5 -1
  546. package/lib/tntd-cascader/AntdCascader/index.js.map +1 -1
  547. package/lib/tntd-cascader/rc-cascader/Cascader.js +5 -1
  548. package/lib/tntd-cascader/rc-cascader/Cascader.js.map +1 -1
  549. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +5 -1
  550. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js.map +1 -1
  551. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +5 -1
  552. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js.map +1 -1
  553. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +5 -1
  554. package/lib/tntd-cascader/rc-cascader/OptionList/index.js.map +1 -1
  555. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -1
  556. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js.map +1 -1
  557. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +5 -1
  558. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js.map +1 -1
  559. package/lib/tntd-cascader/rc-cascader/context.js +5 -1
  560. package/lib/tntd-cascader/rc-cascader/context.js.map +1 -1
  561. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -1
  562. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js.map +1 -1
  563. package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +5 -1
  564. package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js.map +1 -1
  565. package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +5 -1
  566. package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js.map +1 -1
  567. package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +5 -1
  568. package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js.map +1 -1
  569. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +5 -1
  570. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js.map +1 -1
  571. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +5 -1
  572. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js.map +1 -1
  573. package/lib/tntd-form/ErrorList.d.ts +13 -0
  574. package/lib/tntd-form/ErrorList.d.ts.map +1 -0
  575. package/lib/tntd-form/ErrorList.js +82 -0
  576. package/lib/tntd-form/ErrorList.js.map +1 -0
  577. package/lib/tntd-form/Form.d.ts +36 -0
  578. package/lib/tntd-form/Form.d.ts.map +1 -0
  579. package/lib/tntd-form/Form.js +132 -0
  580. package/lib/tntd-form/Form.js.map +1 -0
  581. package/lib/tntd-form/FormItem/ItemHolder.d.ts +18 -0
  582. package/lib/tntd-form/FormItem/ItemHolder.d.ts.map +1 -0
  583. package/lib/tntd-form/FormItem/ItemHolder.js +164 -0
  584. package/lib/tntd-form/FormItem/ItemHolder.js.map +1 -0
  585. package/lib/tntd-form/FormItem/index.d.ts +36 -0
  586. package/lib/tntd-form/FormItem/index.d.ts.map +1 -0
  587. package/lib/tntd-form/FormItem/index.js +266 -0
  588. package/lib/tntd-form/FormItem/index.js.map +1 -0
  589. package/lib/tntd-form/FormItemInput.d.ts +30 -0
  590. package/lib/tntd-form/FormItemInput.d.ts.map +1 -0
  591. package/lib/tntd-form/FormItemInput.js +66 -0
  592. package/lib/tntd-form/FormItemInput.js.map +1 -0
  593. package/lib/tntd-form/FormItemLabel.d.ts +24 -0
  594. package/lib/tntd-form/FormItemLabel.d.ts.map +1 -0
  595. package/lib/tntd-form/FormItemLabel.js +101 -0
  596. package/lib/tntd-form/FormItemLabel.js.map +1 -0
  597. package/lib/tntd-form/FormList.d.ts +26 -0
  598. package/lib/tntd-form/FormList.d.ts.map +1 -0
  599. package/lib/tntd-form/FormList.js +62 -0
  600. package/lib/tntd-form/FormList.js.map +1 -0
  601. package/lib/tntd-form/TntdForm/components/Item.js +5 -1
  602. package/lib/tntd-form/TntdForm/components/Item.js.map +1 -1
  603. package/lib/tntd-form/TntdForm/components/ItemComp.js +7 -3
  604. package/lib/tntd-form/TntdForm/components/ItemComp.js.map +1 -1
  605. package/lib/tntd-form/TntdForm/components/List.js +5 -1
  606. package/lib/tntd-form/TntdForm/components/List.js.map +1 -1
  607. package/lib/tntd-form/TntdForm/index.js +5 -1
  608. package/lib/tntd-form/TntdForm/index.js.map +1 -1
  609. package/lib/tntd-form/__tests__/demo-extend.test.d.ts +2 -0
  610. package/lib/tntd-form/__tests__/demo-extend.test.d.ts.map +1 -0
  611. package/lib/tntd-form/__tests__/demo-extend.test.js +5 -0
  612. package/lib/tntd-form/__tests__/demo-extend.test.js.map +1 -0
  613. package/lib/tntd-form/__tests__/demo.test.d.ts +2 -0
  614. package/lib/tntd-form/__tests__/demo.test.d.ts.map +1 -0
  615. package/lib/tntd-form/__tests__/demo.test.js +8 -0
  616. package/lib/tntd-form/__tests__/demo.test.js.map +1 -0
  617. package/lib/tntd-form/__tests__/image.test.d.ts +2 -0
  618. package/lib/tntd-form/__tests__/image.test.d.ts.map +1 -0
  619. package/lib/tntd-form/__tests__/image.test.js +7 -0
  620. package/lib/tntd-form/__tests__/image.test.js.map +1 -0
  621. package/lib/tntd-form/__tests__/index.test.d.ts +2 -0
  622. package/lib/tntd-form/__tests__/index.test.d.ts.map +1 -0
  623. package/lib/tntd-form/__tests__/index.test.js +981 -0
  624. package/lib/tntd-form/__tests__/index.test.js.map +1 -0
  625. package/lib/tntd-form/__tests__/list-noStyle.test.d.ts +2 -0
  626. package/lib/tntd-form/__tests__/list-noStyle.test.d.ts.map +1 -0
  627. package/lib/tntd-form/__tests__/list-noStyle.test.js +46 -0
  628. package/lib/tntd-form/__tests__/list-noStyle.test.js.map +1 -0
  629. package/lib/tntd-form/__tests__/list.test.d.ts +2 -0
  630. package/lib/tntd-form/__tests__/list.test.d.ts.map +1 -0
  631. package/lib/tntd-form/__tests__/list.test.js +169 -0
  632. package/lib/tntd-form/__tests__/list.test.js.map +1 -0
  633. package/lib/tntd-form/__tests__/ref.test.d.ts +2 -0
  634. package/lib/tntd-form/__tests__/ref.test.d.ts.map +1 -0
  635. package/lib/tntd-form/__tests__/ref.test.js +50 -0
  636. package/lib/tntd-form/__tests__/ref.test.js.map +1 -0
  637. package/lib/tntd-form/__tests__/type.test.d.ts +2 -0
  638. package/lib/tntd-form/__tests__/type.test.d.ts.map +1 -0
  639. package/lib/tntd-form/__tests__/type.test.js +98 -0
  640. package/lib/tntd-form/__tests__/type.test.js.map +1 -0
  641. package/lib/tntd-form/_util/motion.d.ts +9 -0
  642. package/lib/tntd-form/_util/motion.d.ts.map +1 -0
  643. package/lib/tntd-form/_util/motion.js +42 -0
  644. package/lib/tntd-form/_util/motion.js.map +1 -0
  645. package/lib/tntd-form/_util/reactNode.d.ts +9 -0
  646. package/lib/tntd-form/_util/reactNode.d.ts.map +1 -0
  647. package/lib/tntd-form/_util/reactNode.js +44 -0
  648. package/lib/tntd-form/_util/reactNode.js.map +1 -0
  649. package/lib/tntd-form/_util/scrollTo.d.ts +1 -0
  650. package/lib/tntd-form/_util/scrollTo.d.ts.map +1 -0
  651. package/lib/tntd-form/_util/scrollTo.js +35 -0
  652. package/lib/tntd-form/_util/scrollTo.js.map +1 -0
  653. package/lib/tntd-form/_util/type.d.ts +4 -0
  654. package/lib/tntd-form/_util/type.d.ts.map +1 -0
  655. package/lib/tntd-form/_util/type.js +9 -0
  656. package/lib/tntd-form/_util/type.js.map +1 -0
  657. package/lib/tntd-form/_util/warning.d.ts +5 -0
  658. package/lib/tntd-form/_util/warning.d.ts.map +1 -0
  659. package/lib/tntd-form/_util/warning.js +32 -0
  660. package/lib/tntd-form/_util/warning.js.map +1 -0
  661. package/lib/tntd-form/_util/wave.d.ts +1 -0
  662. package/lib/tntd-form/_util/wave.d.ts.map +1 -0
  663. package/lib/tntd-form/_util/wave.js +168 -0
  664. package/lib/tntd-form/_util/wave.js.map +1 -0
  665. package/lib/tntd-form/context.d.ts +51 -0
  666. package/lib/tntd-form/context.d.ts.map +1 -0
  667. package/lib/tntd-form/context.js +66 -0
  668. package/lib/tntd-form/context.js.map +1 -0
  669. package/lib/tntd-form/hooks/useDebounce.d.ts +2 -0
  670. package/lib/tntd-form/hooks/useDebounce.d.ts.map +1 -0
  671. package/lib/tntd-form/hooks/useDebounce.js +40 -0
  672. package/lib/tntd-form/hooks/useDebounce.js.map +1 -0
  673. package/lib/tntd-form/hooks/useForm.d.ts +16 -0
  674. package/lib/tntd-form/hooks/useForm.d.ts.map +1 -0
  675. package/lib/tntd-form/hooks/useForm.js +64 -0
  676. package/lib/tntd-form/hooks/useForm.js.map +1 -0
  677. package/lib/tntd-form/hooks/useFormInstance.d.ts +3 -0
  678. package/lib/tntd-form/hooks/useFormInstance.d.ts.map +1 -0
  679. package/lib/tntd-form/hooks/useFormInstance.js +10 -0
  680. package/lib/tntd-form/hooks/useFormInstance.js.map +1 -0
  681. package/lib/tntd-form/hooks/useFormItemStatus.d.ts +7 -0
  682. package/lib/tntd-form/hooks/useFormItemStatus.d.ts.map +1 -0
  683. package/lib/tntd-form/hooks/useFormItemStatus.js +15 -0
  684. package/lib/tntd-form/hooks/useFormItemStatus.js.map +1 -0
  685. package/lib/tntd-form/hooks/useFrameState.d.ts +4 -0
  686. package/lib/tntd-form/hooks/useFrameState.d.ts.map +1 -0
  687. package/lib/tntd-form/hooks/useFrameState.js +67 -0
  688. package/lib/tntd-form/hooks/useFrameState.js.map +1 -0
  689. package/lib/tntd-form/hooks/useItemRef.d.ts +4 -0
  690. package/lib/tntd-form/hooks/useItemRef.d.ts.map +1 -0
  691. package/lib/tntd-form/hooks/useItemRef.js +45 -0
  692. package/lib/tntd-form/hooks/useItemRef.js.map +1 -0
  693. package/lib/tntd-form/index.d.ts +23 -1
  694. package/lib/tntd-form/index.d.ts.map +1 -1
  695. package/lib/tntd-form/index.js +40 -3
  696. package/lib/tntd-form/index.js.map +1 -1
  697. package/lib/tntd-form/interface.d.ts +4 -0
  698. package/lib/tntd-form/interface.d.ts.map +1 -0
  699. package/lib/tntd-form/interface.js +5 -0
  700. package/lib/tntd-form/interface.js.map +1 -0
  701. package/lib/tntd-form/style/components.less +16 -0
  702. package/lib/tntd-form/style/horizontal.less +26 -0
  703. package/lib/tntd-form/style/index.d.ts +5 -0
  704. package/lib/tntd-form/style/index.d.ts.map +1 -0
  705. package/lib/tntd-form/style/index.js +8 -0
  706. package/lib/tntd-form/style/index.js.map +1 -0
  707. package/lib/tntd-form/style/index.less +342 -0
  708. package/lib/tntd-form/style/inline.less +40 -0
  709. package/lib/tntd-form/style/mixin.less +90 -0
  710. package/lib/tntd-form/style/rtl.less +204 -0
  711. package/lib/tntd-form/style/status.less +45 -0
  712. package/lib/tntd-form/style/vertical.less +95 -0
  713. package/lib/tntd-form/tntd-form.stories.d.ts +33 -0
  714. package/lib/tntd-form/tntd-form.stories.d.ts.map +1 -0
  715. package/lib/tntd-form/tntd-form.stories.js +455 -0
  716. package/lib/tntd-form/tntd-form.stories.js.map +1 -0
  717. package/lib/tntd-form/util.d.ts +4 -0
  718. package/lib/tntd-form/util.d.ts.map +1 -0
  719. package/lib/tntd-form/util.js +26 -0
  720. package/lib/tntd-form/util.js.map +1 -0
  721. package/lib/tntd-form/validateMessagesContext.d.ts +5 -0
  722. package/lib/tntd-form/validateMessagesContext.d.ts.map +1 -0
  723. package/lib/tntd-form/validateMessagesContext.js +8 -0
  724. package/lib/tntd-form/validateMessagesContext.js.map +1 -0
  725. package/lib/tntd-layout/AppList.js +5 -1
  726. package/lib/tntd-layout/AppList.js.map +1 -1
  727. package/lib/tntd-layout/Application.js +5 -1
  728. package/lib/tntd-layout/Application.js.map +1 -1
  729. package/lib/tntd-layout/Avatar.js +5 -1
  730. package/lib/tntd-layout/Avatar.js.map +1 -1
  731. package/lib/tntd-layout/CompatibleLanguage.js +5 -1
  732. package/lib/tntd-layout/CompatibleLanguage.js.map +1 -1
  733. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +5 -1
  734. package/lib/tntd-layout/EnterpriseLayout/Avatar.js.map +1 -1
  735. package/lib/tntd-layout/EnterpriseLayout/Language.js +5 -1
  736. package/lib/tntd-layout/EnterpriseLayout/Language.js.map +1 -1
  737. package/lib/tntd-layout/EnterpriseLayout/Theme.js +5 -1
  738. package/lib/tntd-layout/EnterpriseLayout/Theme.js.map +1 -1
  739. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +5 -1
  740. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js.map +1 -1
  741. package/lib/tntd-layout/GlobalNavigation/index.js +5 -1
  742. package/lib/tntd-layout/GlobalNavigation/index.js.map +1 -1
  743. package/lib/tntd-layout/Header.js +5 -1
  744. package/lib/tntd-layout/Header.js.map +1 -1
  745. package/lib/tntd-layout/HeaderActions.js +5 -1
  746. package/lib/tntd-layout/HeaderActions.js.map +1 -1
  747. package/lib/tntd-layout/HeaderNavs.js +5 -1
  748. package/lib/tntd-layout/HeaderNavs.js.map +1 -1
  749. package/lib/tntd-layout/HeaderTabs.js +5 -1
  750. package/lib/tntd-layout/HeaderTabs.js.map +1 -1
  751. package/lib/tntd-layout/Language.js +5 -1
  752. package/lib/tntd-layout/Language.js.map +1 -1
  753. package/lib/tntd-layout/Layout.js +5 -1
  754. package/lib/tntd-layout/Layout.js.map +1 -1
  755. package/lib/tntd-layout/Logo.js +5 -1
  756. package/lib/tntd-layout/Logo.js.map +1 -1
  757. package/lib/tntd-layout/OrgAppList.js +5 -1
  758. package/lib/tntd-layout/OrgAppList.js.map +1 -1
  759. package/lib/tntd-layout/SideMenu.js +5 -1
  760. package/lib/tntd-layout/SideMenu.js.map +1 -1
  761. package/lib/tntd-layout/Theme.js +5 -1
  762. package/lib/tntd-layout/Theme.js.map +1 -1
  763. package/lib/tntd-layout/index.js +5 -1
  764. package/lib/tntd-layout/index.js.map +1 -1
  765. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +5 -1
  766. package/lib/tntd-layout/paaslayout/CompactSideMenu.js.map +1 -1
  767. package/lib/tntd-layout/paaslayout/Header.js +5 -1
  768. package/lib/tntd-layout/paaslayout/Header.js.map +1 -1
  769. package/lib/tntd-layout/paaslayout/SideMenu.js +5 -1
  770. package/lib/tntd-layout/paaslayout/SideMenu.js.map +1 -1
  771. package/lib/tntd-layout/paaslayout/index.js +5 -1
  772. package/lib/tntd-layout/paaslayout/index.js.map +1 -1
  773. package/lib/tntd-modal/index.js +5 -1
  774. package/lib/tntd-modal/index.js.map +1 -1
  775. package/lib/tntd-select/DropDownWrap.d.ts +10 -0
  776. package/lib/tntd-select/DropDownWrap.d.ts.map +1 -1
  777. package/lib/tntd-select/DropDownWrap.js +5 -1
  778. package/lib/tntd-select/DropDownWrap.js.map +1 -1
  779. package/lib/tntd-select/index.d.ts +12 -1
  780. package/lib/tntd-select/index.d.ts.map +1 -1
  781. package/lib/tntd-select/index.js +5 -1
  782. package/lib/tntd-select/index.js.map +1 -1
  783. package/lib/tooltip/index.js +5 -1
  784. package/lib/tooltip/index.js.map +1 -1
  785. package/lib/transfer/index.js +5 -1
  786. package/lib/transfer/index.js.map +1 -1
  787. package/lib/tree/index.js +5 -1
  788. package/lib/tree/index.js.map +1 -1
  789. package/lib/tree-select/index.d.ts +7 -1
  790. package/lib/tree-select/index.d.ts.map +1 -1
  791. package/lib/tree-select/index.js +10 -2
  792. package/lib/tree-select/index.js.map +1 -1
  793. package/lib/typography/index.js +5 -1
  794. package/lib/typography/index.js.map +1 -1
  795. package/lib/upload/index.d.ts +6 -1
  796. package/lib/upload/index.d.ts.map +1 -1
  797. package/lib/upload/index.js +11 -2
  798. package/lib/upload/index.js.map +1 -1
  799. package/lib/utils/index.js +5 -1
  800. package/lib/utils/index.js.map +1 -1
  801. package/lib/version/index.js +5 -1
  802. package/lib/version/index.js.map +1 -1
  803. package/package.json +7 -4
  804. package/themes/default/variables.less +43 -0
  805. package/es/mention/index.js +0 -5
  806. package/es/mention/index.js.map +0 -1
  807. package/lib/mention/index.d.ts +0 -5
  808. package/lib/mention/index.d.ts.map +0 -1
  809. package/lib/mention/index.js +0 -20
  810. package/lib/mention/index.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ import { tuple } from './type';
2
+ // eslint-disable-next-line import/prefer-default-export
3
+ export const PresetColorTypes = tuple('pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime');
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/_util/colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,wDAAwD;AACxD,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CACnC,MAAM,EACN,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,CACP,CAAC","sourcesContent":["import { tuple } from './type';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const PresetColorTypes = tuple(\n 'pink',\n 'red',\n 'yellow',\n 'orange',\n 'cyan',\n 'green',\n 'blue',\n 'purple',\n 'geekblue',\n 'magenta',\n 'volcano',\n 'gold',\n 'lime',\n);\n\nexport type PresetColorType = (typeof PresetColorTypes)[number];\n"]}
@@ -0,0 +1,9 @@
1
+ // eslint-disable-next-line import/prefer-default-export
2
+ export function easeInOutCubic(t, b, c, d) {
3
+ const cc = c - b;
4
+ t /= d / 2;
5
+ if (t < 1) {
6
+ return cc / 2 * t * t * t + b;
7
+ }
8
+ return cc / 2 * ((t -= 2) * t * t + 2) + b;
9
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"easings.js","sourceRoot":"","sources":["../../src/_util/easings.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,UAAU,cAAc,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS;IACvE,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACX,IAAI,CAAC,GAAG,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KACjC;IACD,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["// eslint-disable-next-line import/prefer-default-export\nexport function easeInOutCubic(t: number, b: number, c: number, d: number) {\n const cc = c - b;\n t /= d / 2;\n if (t < 1) {\n return (cc / 2) * t * t * t + b;\n }\n return (cc / 2) * ((t -= 2) * t * t + 2) + b;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ export default function getDataOrAriaProps(props) {
2
+ return Object.keys(props).reduce((prev, key) => {
3
+ if ((key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') && key.substr(0, 7) !== 'data-__') {
4
+ prev[key] = props[key];
5
+ }
6
+ return prev;
7
+ }, {});
8
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDataOrAriaProps.js","sourceRoot":"","sources":["../../src/_util/getDataOrAriaProps.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAU;IACnD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAS,EAAE,GAAW,EAAE,EAAE;QAC1D,IACE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,OAAO,IAAI,GAAG,KAAK,MAAM,CAAC;YAChF,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,SAAS,EAC9B;YACA,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;SACxB;QACD,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC","sourcesContent":["export default function getDataOrAriaProps(props: any) {\n return Object.keys(props).reduce((prev: any, key: string) => {\n if (\n (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') &&\n key.substr(0, 7) !== 'data-__'\n ) {\n prev[key] = props[key];\n }\n return prev;\n }, {});\n}\n"]}
@@ -0,0 +1,14 @@
1
+ export default function getScroll(target, top) {
2
+ if (typeof window === 'undefined') {
3
+ return 0;
4
+ }
5
+ const prop = top ? 'pageYOffset' : 'pageXOffset';
6
+ const method = top ? 'scrollTop' : 'scrollLeft';
7
+ const isWindow = target === window;
8
+ let ret = isWindow ? target[prop] : target[method];
9
+ // ie6,7,8 standard mode
10
+ if (isWindow && typeof ret !== 'number') {
11
+ ret = document.documentElement[method];
12
+ }
13
+ return ret;
14
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getScroll.js","sourceRoot":"","sources":["../../src/_util/getScroll.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,MAAmC,EAAE,GAAY;IACjF,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,OAAO,CAAC,CAAC;KACV;IAED,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC;IAChD,MAAM,QAAQ,GAAG,MAAM,KAAK,MAAM,CAAC;IAEnC,IAAI,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAE,MAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE,MAAsB,CAAC,MAAM,CAAC,CAAC;IAChF,wBAAwB;IACxB,IAAI,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QACvC,GAAG,GAAI,QAAQ,CAAC,eAA+B,CAAC,MAAM,CAAC,CAAC;KACzD;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["export default function getScroll(target: HTMLElement | Window | null, top: boolean): number {\n if (typeof window === 'undefined') {\n return 0;\n }\n\n const prop = top ? 'pageYOffset' : 'pageXOffset';\n const method = top ? 'scrollTop' : 'scrollLeft';\n const isWindow = target === window;\n\n let ret = isWindow ? (target as Window)[prop] : (target as HTMLElement)[method];\n // ie6,7,8 standard mode\n if (isWindow && typeof ret !== 'number') {\n ret = (document.documentElement as HTMLElement)[method];\n }\n\n return ret;\n}\n"]}
@@ -0,0 +1,5 @@
1
+ // https://github.com/moment/moment/issues/3650
2
+ // since we are using ts 3.5.1, it should be safe to remove.
3
+ export default function interopDefault(m) {
4
+ return m.default || m;
5
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interopDefault.js","sourceRoot":"","sources":["../../src/_util/interopDefault.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,4DAA4D;AAC5D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAM;IAC3C,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC;AACxB,CAAC","sourcesContent":["// https://github.com/moment/moment/issues/3650\n// since we are using ts 3.5.1, it should be safe to remove.\nexport default function interopDefault(m: any) {\n return m.default || m;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ const isNumeric = value => {
2
+ return !isNaN(parseFloat(value)) && isFinite(value);
3
+ };
4
+ export default isNumeric;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNumeric.js","sourceRoot":"","sources":["../../src/_util/isNumeric.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,CAAC,KAAU,EAAW,EAAE;IACxC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC;AACtD,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["const isNumeric = (value: any): boolean => {\n return !isNaN(parseFloat(value)) && isFinite(value);\n};\n\nexport default isNumeric;\n"]}
@@ -0,0 +1,22 @@
1
+ // ================== Collapse Motion ==================
2
+ const getCollapsedHeight = () => ({
3
+ height: 0,
4
+ opacity: 0
5
+ });
6
+ const getRealHeight = node => ({
7
+ height: node.scrollHeight,
8
+ opacity: 1
9
+ });
10
+ const getCurrentHeight = node => ({
11
+ height: node.offsetHeight
12
+ });
13
+ const collapseMotion = {
14
+ motionName: 'ant-motion-collapse',
15
+ onAppearStart: getCollapsedHeight,
16
+ onEnterStart: getCollapsedHeight,
17
+ onAppearActive: getRealHeight,
18
+ onEnterActive: getRealHeight,
19
+ onLeaveStart: getCurrentHeight,
20
+ onLeaveActive: getCollapsedHeight
21
+ };
22
+ export default collapseMotion;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion.js","sourceRoot":"","sources":["../../src/_util/motion.tsx"],"names":[],"mappings":"AAwBA,wDAAwD;AACxD,MAAM,kBAAkB,GAAe,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;AACxE,MAAM,aAAa,GAAe,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;AACrF,MAAM,gBAAgB,GAAe,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAA;AAE5E,MAAM,cAAc,GAAW;IAC7B,UAAU,EAAE,qBAAqB;IACjC,aAAa,EAAE,kBAAkB;IACjC,YAAY,EAAE,kBAAkB;IAChC,cAAc,EAAE,aAAa;IAC7B,aAAa,EAAE,aAAa;IAC5B,YAAY,EAAE,gBAAgB;IAC9B,aAAa,EAAE,kBAAkB;CAClC,CAAA;AAED,eAAe,cAAc,CAAA","sourcesContent":["import type React from 'react'\n\ntype MotionFunc = (element: HTMLElement) => React.CSSProperties\n\ninterface Motion {\n visible?: boolean\n motionName?: string // It also support object, but we only use string here.\n motionAppear?: boolean\n motionEnter?: boolean\n motionLeave?: boolean\n motionLeaveImmediately?: boolean // Trigger leave motion immediately\n removeOnLeave?: boolean\n leavedClassName?: string\n onAppearStart?: MotionFunc\n onAppearActive?: MotionFunc\n onAppearEnd?: MotionFunc\n onEnterStart?: MotionFunc\n onEnterActive?: MotionFunc\n onEnterEnd?: MotionFunc\n onLeaveStart?: MotionFunc\n onLeaveActive?: MotionFunc\n onLeaveEnd?: MotionFunc\n}\n\n// ================== Collapse Motion ==================\nconst getCollapsedHeight: MotionFunc = () => ({ height: 0, opacity: 0 })\nconst getRealHeight: MotionFunc = node => ({ height: node.scrollHeight, opacity: 1 })\nconst getCurrentHeight: MotionFunc = node => ({ height: node.offsetHeight })\n\nconst collapseMotion: Motion = {\n motionName: 'ant-motion-collapse',\n onAppearStart: getCollapsedHeight,\n onEnterStart: getCollapsedHeight,\n onAppearActive: getRealHeight,\n onEnterActive: getRealHeight,\n onLeaveStart: getCurrentHeight,\n onLeaveActive: getCollapsedHeight,\n}\n\nexport default collapseMotion\n"]}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Deprecated. We should replace the animation with pure react motion instead of modify style directly.
3
+ * If you are creating new component with animation, please use `./motion`.
4
+ */
5
+ import cssAnimation from 'css-animation';
6
+ import raf from 'raf';
7
+ function animate(node, show, done) {
8
+ let height;
9
+ let requestAnimationFrameId;
10
+ return cssAnimation(node, 'ant-motion-collapse-legacy', {
11
+ start() {
12
+ if (!show) {
13
+ node.style.height = `${node.offsetHeight}px`;
14
+ node.style.opacity = '1';
15
+ } else {
16
+ height = node.offsetHeight;
17
+ node.style.height = '0px';
18
+ node.style.opacity = '0';
19
+ }
20
+ },
21
+ active() {
22
+ if (requestAnimationFrameId) {
23
+ raf.cancel(requestAnimationFrameId);
24
+ }
25
+ requestAnimationFrameId = raf(() => {
26
+ node.style.height = `${show ? height : 0}px`;
27
+ node.style.opacity = show ? '1' : '0';
28
+ });
29
+ },
30
+ end() {
31
+ if (requestAnimationFrameId) {
32
+ raf.cancel(requestAnimationFrameId);
33
+ }
34
+ node.style.height = '';
35
+ node.style.opacity = '';
36
+ done();
37
+ }
38
+ });
39
+ }
40
+ const animation = {
41
+ enter(node, done) {
42
+ return animate(node, true, done);
43
+ },
44
+ leave(node, done) {
45
+ return animate(node, false, done);
46
+ },
47
+ appear(node, done) {
48
+ return animate(node, true, done);
49
+ }
50
+ };
51
+ export default animation;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openAnimation.js","sourceRoot":"","sources":["../../src/_util/openAnimation.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,SAAS,OAAO,CAAC,IAAiB,EAAE,IAAa,EAAE,IAAgB;IACjE,IAAI,MAAc,CAAC;IACnB,IAAI,uBAA+B,CAAC;IACpC,OAAO,YAAY,CAAC,IAAI,EAAE,4BAA4B,EAAE;QACtD,KAAK;YACH,IAAI,CAAC,IAAI,EAAE;gBACT,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,IAAI,CAAC;gBAC7C,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;aAC1B;iBAAM;gBACL,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC;gBAC3B,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;gBAC1B,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;aAC1B;QACH,CAAC;QACD,MAAM;YACJ,IAAI,uBAAuB,EAAE;gBAC3B,GAAG,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;aACrC;YACD,uBAAuB,GAAG,GAAG,CAAC,GAAG,EAAE;gBACjC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC7C,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;YACxC,CAAC,CAAC,CAAC;QACL,CAAC;QACD,GAAG;YACD,IAAI,uBAAuB,EAAE;gBAC3B,GAAG,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;aACrC;YACD,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;YACvB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;YACxB,IAAI,EAAE,CAAC;QACT,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,SAAS,GAAG;IAChB,KAAK,CAAC,IAAiB,EAAE,IAAgB;QACvC,OAAO,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;IACD,KAAK,CAAC,IAAiB,EAAE,IAAgB;QACvC,OAAO,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IACD,MAAM,CAAC,IAAiB,EAAE,IAAgB;QACxC,OAAO,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;CACF,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n * Deprecated. We should replace the animation with pure react motion instead of modify style directly.\n * If you are creating new component with animation, please use `./motion`.\n */\nimport cssAnimation from 'css-animation';\nimport raf from 'raf';\n\nfunction animate(node: HTMLElement, show: boolean, done: () => void) {\n let height: number;\n let requestAnimationFrameId: number;\n return cssAnimation(node, 'ant-motion-collapse-legacy', {\n start() {\n if (!show) {\n node.style.height = `${node.offsetHeight}px`;\n node.style.opacity = '1';\n } else {\n height = node.offsetHeight;\n node.style.height = '0px';\n node.style.opacity = '0';\n }\n },\n active() {\n if (requestAnimationFrameId) {\n raf.cancel(requestAnimationFrameId);\n }\n requestAnimationFrameId = raf(() => {\n node.style.height = `${show ? height : 0}px`;\n node.style.opacity = show ? '1' : '0';\n });\n },\n end() {\n if (requestAnimationFrameId) {\n raf.cancel(requestAnimationFrameId);\n }\n node.style.height = '';\n node.style.opacity = '';\n done();\n },\n });\n}\n\nconst animation = {\n enter(node: HTMLElement, done: () => void) {\n return animate(node, true, done);\n },\n leave(node: HTMLElement, done: () => void) {\n return animate(node, false, done);\n },\n appear(node: HTMLElement, done: () => void) {\n return animate(node, true, done);\n },\n};\n\nexport default animation;\n"]}
@@ -0,0 +1,25 @@
1
+ import raf from 'raf';
2
+ let id = 0;
3
+ const ids = {};
4
+ // Support call raf with delay specified frame
5
+ export default function wrapperRaf(callback, delayFrames = 1) {
6
+ const myId = id++;
7
+ let restFrames = delayFrames;
8
+ function internalCallback() {
9
+ restFrames -= 1;
10
+ if (restFrames <= 0) {
11
+ callback();
12
+ delete ids[myId];
13
+ } else {
14
+ ids[myId] = raf(internalCallback);
15
+ }
16
+ }
17
+ ids[myId] = raf(internalCallback);
18
+ return myId;
19
+ }
20
+ wrapperRaf.cancel = function cancel(pid) {
21
+ if (pid === undefined) return;
22
+ raf.cancel(ids[pid]);
23
+ delete ids[pid];
24
+ };
25
+ wrapperRaf.ids = ids; // export this for test usage
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raf.js","sourceRoot":"","sources":["../../src/_util/raf.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAMtB,IAAI,EAAE,GAAW,CAAC,CAAC;AACnB,MAAM,GAAG,GAAW,EAAE,CAAC;AAEvB,8CAA8C;AAC9C,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,QAAoB,EAAE,cAAsB,CAAC;IAC9E,MAAM,IAAI,GAAW,EAAE,EAAE,CAAC;IAC1B,IAAI,UAAU,GAAW,WAAW,CAAC;IAErC,SAAS,gBAAgB;QACvB,UAAU,IAAI,CAAC,CAAC;QAEhB,IAAI,UAAU,IAAI,CAAC,EAAE;YACnB,QAAQ,EAAE,CAAC;YACX,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC;SAClB;aAAM;YACL,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,gBAAgB,CAAC,CAAC;SACnC;IACH,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAElC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,UAAU,CAAC,MAAM,GAAG,SAAS,MAAM,CAAC,GAAY;IAC9C,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO;IAE9B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAClB,CAAC,CAAC;AAEF,UAAU,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,6BAA6B","sourcesContent":["import raf from 'raf';\n\ninterface RafMap {\n [id: number]: number;\n}\n\nlet id: number = 0;\nconst ids: RafMap = {};\n\n// Support call raf with delay specified frame\nexport default function wrapperRaf(callback: () => void, delayFrames: number = 1): number {\n const myId: number = id++;\n let restFrames: number = delayFrames;\n\n function internalCallback() {\n restFrames -= 1;\n\n if (restFrames <= 0) {\n callback();\n delete ids[myId];\n } else {\n ids[myId] = raf(internalCallback);\n }\n }\n\n ids[myId] = raf(internalCallback);\n\n return myId;\n}\n\nwrapperRaf.cancel = function cancel(pid?: number) {\n if (pid === undefined) return;\n\n raf.cancel(ids[pid]);\n delete ids[pid];\n};\n\nwrapperRaf.ids = ids; // export this for test usage\n"]}
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ // eslint-disable-next-line import/prefer-default-export
3
+ export function cloneElement(element, ...restArgs) {
4
+ if (!React.isValidElement(element)) return element;
5
+ return React.cloneElement(element, ...restArgs);
6
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactNode.js","sourceRoot":"","sources":["../../src/_util/reactNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,wDAAwD;AACxD,MAAM,UAAU,YAAY,CAAC,OAAwB,EAAE,GAAG,QAAe;IACvE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAEnD,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,CAAC;AAClD,CAAC","sourcesContent":["import * as React from 'react';\n\n// eslint-disable-next-line import/prefer-default-export\nexport function cloneElement(element: React.ReactNode, ...restArgs: any[]) {\n if (!React.isValidElement(element)) return element;\n\n return React.cloneElement(element, ...restArgs);\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import 'react';
2
+ export function fillRef(ref, node) {
3
+ if (typeof ref === 'function') {
4
+ ref(node);
5
+ } else if (typeof ref === 'object' && ref && 'current' in ref) {
6
+ ref.current = node;
7
+ }
8
+ }
9
+ export function composeRef(...refs) {
10
+ return node => {
11
+ refs.forEach(ref => {
12
+ fillRef(ref, node);
13
+ });
14
+ };
15
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref.js","sourceRoot":"","sources":["../../src/_util/ref.ts"],"names":[],"mappings":"AAAA,OAAkB,OAAO,CAAC;AAE1B,MAAM,UAAU,OAAO,CAAI,GAAiB,EAAE,IAAO;IACnD,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC7B,GAAG,CAAC,IAAI,CAAC,CAAC;KACX;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,EAAE;QAC5D,GAAW,CAAC,OAAO,GAAG,IAAI,CAAC;KAC7B;AACH,CAAC;AAED,MAAM,UAAU,UAAU,CAAI,GAAG,IAAoB;IACnD,OAAO,CAAC,IAAO,EAAE,EAAE;QACjB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACjB,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nexport function fillRef<T>(ref: React.Ref<T>, node: T) {\n if (typeof ref === 'function') {\n ref(node);\n } else if (typeof ref === 'object' && ref && 'current' in ref) {\n (ref as any).current = node;\n }\n}\n\nexport function composeRef<T>(...refs: React.Ref<T>[]): React.Ref<T> {\n return (node: T) => {\n refs.forEach(ref => {\n fillRef(ref, node);\n });\n };\n}\n"]}
@@ -0,0 +1,82 @@
1
+ // matchMedia polyfill for
2
+ // https://github.com/WickyNilliams/enquire.js/issues/82
3
+ let enquire;
4
+ // TODO: Will be removed in antd 4.0 because we will no longer support ie9
5
+ if (typeof window !== 'undefined') {
6
+ const matchMediaPolyfill = mediaQuery => {
7
+ return {
8
+ media: mediaQuery,
9
+ matches: false,
10
+ addListener() {},
11
+ removeListener() {}
12
+ };
13
+ };
14
+ // ref: https://github.com/ant-design/ant-design/issues/18774
15
+ if (!window.matchMedia) window.matchMedia = matchMediaPolyfill;
16
+ // eslint-disable-next-line global-require
17
+ enquire = require('enquire.js');
18
+ }
19
+ export const responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
20
+ export const responsiveMap = {
21
+ xs: '(max-width: 575px)',
22
+ sm: '(min-width: 576px)',
23
+ md: '(min-width: 768px)',
24
+ lg: '(min-width: 992px)',
25
+ xl: '(min-width: 1200px)',
26
+ xxl: '(min-width: 1600px)'
27
+ };
28
+ let subscribers = [];
29
+ let subUid = -1;
30
+ let screens = {};
31
+ const responsiveObserve = {
32
+ dispatch(pointMap) {
33
+ screens = pointMap;
34
+ if (subscribers.length < 1) {
35
+ return false;
36
+ }
37
+ subscribers.forEach(item => {
38
+ item.func(screens);
39
+ });
40
+ return true;
41
+ },
42
+ subscribe(func) {
43
+ if (subscribers.length === 0) {
44
+ this.register();
45
+ }
46
+ const token = (++subUid).toString();
47
+ subscribers.push({
48
+ token,
49
+ func
50
+ });
51
+ func(screens);
52
+ return token;
53
+ },
54
+ unsubscribe(token) {
55
+ subscribers = subscribers.filter(item => item.token !== token);
56
+ if (subscribers.length === 0) {
57
+ this.unregister();
58
+ }
59
+ },
60
+ unregister() {
61
+ Object.keys(responsiveMap).map(screen => enquire.unregister(responsiveMap[screen]));
62
+ },
63
+ register() {
64
+ Object.keys(responsiveMap).map(screen => enquire.register(responsiveMap[screen], {
65
+ match: () => {
66
+ const pointMap = Object.assign(Object.assign({}, screens), {
67
+ [screen]: true
68
+ });
69
+ this.dispatch(pointMap);
70
+ },
71
+ unmatch: () => {
72
+ const pointMap = Object.assign(Object.assign({}, screens), {
73
+ [screen]: false
74
+ });
75
+ this.dispatch(pointMap);
76
+ },
77
+ // Keep a empty destory to avoid triggering unmatch when unregister
78
+ destroy() {}
79
+ }));
80
+ }
81
+ };
82
+ export default responsiveObserve;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responsiveObserve.js","sourceRoot":"","sources":["../../src/_util/responsiveObserve.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,wDAAwD;AACxD,IAAI,OAAY,CAAC;AAEjB,0EAA0E;AAC1E,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,MAAM,kBAAkB,GAAG,CAAC,UAAkB,EAAE,EAAE;QAChD,OAAO;YACL,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,KAAK;YACd,WAAW,KAAI,CAAC;YAChB,cAAc,KAAI,CAAC;SACpB,CAAC;IACJ,CAAC,CAAC;IACF,6DAA6D;IAC7D,IAAI,CAAC,MAAM,CAAC,UAAU;QAAE,MAAM,CAAC,UAAU,GAAG,kBAAyB,CAAC;IACtE,0CAA0C;IAC1C,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACjC;AAKD,MAAM,CAAC,MAAM,eAAe,GAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAEnF,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,qBAAqB;IACzB,GAAG,EAAE,qBAAqB;CAC3B,CAAC;AAIF,IAAI,WAAW,GAGV,EAAE,CAAC;AACR,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC;AAChB,IAAI,OAAO,GAAG,EAAE,CAAC;AAEjB,MAAM,iBAAiB,GAAG;IACxB,QAAQ,CAAC,QAAuB;QAC9B,OAAO,GAAG,QAAQ,CAAC;QACnB,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YAC1B,OAAO,KAAK,CAAC;SACd;QAED,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;IACD,SAAS,CAAC,IAAmB;QAC3B,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,IAAI,CAAC,QAAQ,EAAE,CAAC;SACjB;QACD,MAAM,KAAK,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC;QACpC,WAAW,CAAC,IAAI,CAAC;YACf,KAAK;YACL,IAAI;SACL,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;IACD,WAAW,CAAC,KAAa;QACvB,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;QAC/D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,IAAI,CAAC,UAAU,EAAE,CAAC;SACnB;IACH,CAAC;IACD,UAAU;QACR,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,MAAkB,EAAE,EAAE,CACpD,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAC1C,CAAC;IACJ,CAAC;IACD,QAAQ;QACN,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,MAAkB,EAAE,EAAE,CACpD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE;YACtC,KAAK,EAAE,GAAG,EAAE;gBACV,MAAM,QAAQ,mCACT,OAAO,KACV,CAAC,MAAM,CAAC,EAAE,IAAI,GACf,CAAC;gBACF,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC1B,CAAC;YACD,OAAO,EAAE,GAAG,EAAE;gBACZ,MAAM,QAAQ,mCACT,OAAO,KACV,CAAC,MAAM,CAAC,EAAE,KAAK,GAChB,CAAC;gBACF,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC1B,CAAC;YACD,mEAAmE;YACnE,OAAO,KAAI,CAAC;SACb,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["// matchMedia polyfill for\n// https://github.com/WickyNilliams/enquire.js/issues/82\nlet enquire: any;\n\n// TODO: Will be removed in antd 4.0 because we will no longer support ie9\nif (typeof window !== 'undefined') {\n const matchMediaPolyfill = (mediaQuery: string) => {\n return {\n media: mediaQuery,\n matches: false,\n addListener() {},\n removeListener() {},\n };\n };\n // ref: https://github.com/ant-design/ant-design/issues/18774\n if (!window.matchMedia) window.matchMedia = matchMediaPolyfill as any;\n // eslint-disable-next-line global-require\n enquire = require('enquire.js');\n}\n\nexport type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';\nexport type BreakpointMap = Partial<Record<Breakpoint, string>>;\n\nexport const responsiveArray: Breakpoint[] = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];\n\nexport const responsiveMap: BreakpointMap = {\n xs: '(max-width: 575px)',\n sm: '(min-width: 576px)',\n md: '(min-width: 768px)',\n lg: '(min-width: 992px)',\n xl: '(min-width: 1200px)',\n xxl: '(min-width: 1600px)',\n};\n\ntype SubscribeFunc = (screens: BreakpointMap) => void;\n\nlet subscribers: Array<{\n token: string;\n func: SubscribeFunc;\n}> = [];\nlet subUid = -1;\nlet screens = {};\n\nconst responsiveObserve = {\n dispatch(pointMap: BreakpointMap) {\n screens = pointMap;\n if (subscribers.length < 1) {\n return false;\n }\n\n subscribers.forEach(item => {\n item.func(screens);\n });\n\n return true;\n },\n subscribe(func: SubscribeFunc) {\n if (subscribers.length === 0) {\n this.register();\n }\n const token = (++subUid).toString();\n subscribers.push({\n token,\n func,\n });\n func(screens);\n return token;\n },\n unsubscribe(token: string) {\n subscribers = subscribers.filter(item => item.token !== token);\n if (subscribers.length === 0) {\n this.unregister();\n }\n },\n unregister() {\n Object.keys(responsiveMap).map((screen: Breakpoint) =>\n enquire.unregister(responsiveMap[screen]),\n );\n },\n register() {\n Object.keys(responsiveMap).map((screen: Breakpoint) =>\n enquire.register(responsiveMap[screen], {\n match: () => {\n const pointMap = {\n ...screens,\n [screen]: true,\n };\n this.dispatch(pointMap);\n },\n unmatch: () => {\n const pointMap = {\n ...screens,\n [screen]: false,\n };\n this.dispatch(pointMap);\n },\n // Keep a empty destory to avoid triggering unmatch when unregister\n destroy() {},\n }),\n );\n },\n};\n\nexport default responsiveObserve;\n"]}
@@ -0,0 +1,29 @@
1
+ import raf from 'raf';
2
+ import getScroll from './getScroll';
3
+ import { easeInOutCubic } from './easings';
4
+ export default function scrollTo(y, options = {}) {
5
+ const {
6
+ getContainer = () => window,
7
+ callback,
8
+ duration = 450
9
+ } = options;
10
+ const container = getContainer();
11
+ const scrollTop = getScroll(container, true);
12
+ const startTime = Date.now();
13
+ const frameFunc = () => {
14
+ const timestamp = Date.now();
15
+ const time = timestamp - startTime;
16
+ const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);
17
+ if (container === window) {
18
+ window.scrollTo(window.pageXOffset, nextScrollTop);
19
+ } else {
20
+ container.scrollTop = nextScrollTop;
21
+ }
22
+ if (time < duration) {
23
+ raf(frameFunc);
24
+ } else if (typeof callback === 'function') {
25
+ callback();
26
+ }
27
+ };
28
+ raf(frameFunc);
29
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scrollTo.js","sourceRoot":"","sources":["../../src/_util/scrollTo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAW3C,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAS,EAAE,UAA2B,EAAE;IACvE,MAAM,EAAE,YAAY,GAAG,GAAG,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC;IAE1E,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC;QACnC,MAAM,aAAa,GAAG,cAAc,CAAC,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;QAChG,IAAI,SAAS,KAAK,MAAM,EAAE;YACxB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;SACpD;aAAM;YACJ,SAAyB,CAAC,SAAS,GAAG,aAAa,CAAC;SACtD;QACD,IAAI,IAAI,GAAG,QAAQ,EAAE;YACnB,GAAG,CAAC,SAAS,CAAC,CAAC;SAChB;aAAM,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;YACzC,QAAQ,EAAE,CAAC;SACZ;IACH,CAAC,CAAC;IACF,GAAG,CAAC,SAAS,CAAC,CAAC;AACjB,CAAC","sourcesContent":["import raf from 'raf';\nimport getScroll from './getScroll';\nimport { easeInOutCubic } from './easings';\n\ninterface ScrollToOptions {\n /** Scroll container, default as window */\n getContainer?: () => HTMLElement | Window;\n /** Scroll end callback */\n callback?: () => any;\n /** Animation duration, default as 450 */\n duration?: number;\n}\n\nexport default function scrollTo(y: number, options: ScrollToOptions = {}) {\n const { getContainer = () => window, callback, duration = 450 } = options;\n\n const container = getContainer();\n const scrollTop = getScroll(container, true);\n const startTime = Date.now();\n\n const frameFunc = () => {\n const timestamp = Date.now();\n const time = timestamp - startTime;\n const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);\n if (container === window) {\n window.scrollTo(window.pageXOffset, nextScrollTop);\n } else {\n (container as HTMLElement).scrollTop = nextScrollTop;\n }\n if (time < duration) {\n raf(frameFunc);\n } else if (typeof callback === 'function') {\n callback();\n }\n };\n raf(frameFunc);\n}\n"]}
@@ -0,0 +1,12 @@
1
+ const isStyleSupport = styleName => {
2
+ if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
3
+ const styleNameList = Array.isArray(styleName) ? styleName : [styleName];
4
+ const {
5
+ documentElement
6
+ } = window.document;
7
+ return styleNameList.some(name => name in documentElement.style);
8
+ }
9
+ return false;
10
+ };
11
+ export const isFlexSupported = isStyleSupport(['flex', 'webkitFlex', 'Flex', 'msFlex']);
12
+ export default isStyleSupport;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleChecker.js","sourceRoot":"","sources":["../../src/_util/styleChecker.tsx"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG,CAAC,SAAiC,EAAW,EAAE;IACpE,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE;QACvF,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QACzE,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC;QAE5C,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;KAClE;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExF,eAAe,cAAc,CAAC","sourcesContent":["const isStyleSupport = (styleName: string | Array<string>): boolean => {\n if (typeof window !== 'undefined' && window.document && window.document.documentElement) {\n const styleNameList = Array.isArray(styleName) ? styleName : [styleName];\n const { documentElement } = window.document;\n\n return styleNameList.some(name => name in documentElement.style);\n }\n return false;\n};\n\nexport const isFlexSupported = isStyleSupport(['flex', 'webkitFlex', 'Flex', 'msFlex']);\n\nexport default isStyleSupport;\n"]}
@@ -0,0 +1,40 @@
1
+ import raf from 'raf';
2
+ export default function throttleByAnimationFrame(fn) {
3
+ let requestId;
4
+ const later = args => () => {
5
+ requestId = null;
6
+ fn(...args);
7
+ };
8
+ const throttled = (...args) => {
9
+ if (requestId == null) {
10
+ requestId = raf(later(args));
11
+ }
12
+ };
13
+ throttled.cancel = () => raf.cancel(requestId);
14
+ return throttled;
15
+ }
16
+ export function throttleByAnimationFrameDecorator() {
17
+ // eslint-disable-next-line func-names
18
+ return function (target, key, descriptor) {
19
+ const fn = descriptor.value;
20
+ let definingProperty = false;
21
+ return {
22
+ configurable: true,
23
+ get() {
24
+ // eslint-disable-next-line no-prototype-builtins
25
+ if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {
26
+ return fn;
27
+ }
28
+ const boundFn = throttleByAnimationFrame(fn.bind(this));
29
+ definingProperty = true;
30
+ Object.defineProperty(this, key, {
31
+ value: boundFn,
32
+ configurable: true,
33
+ writable: true
34
+ });
35
+ definingProperty = false;
36
+ return boundFn;
37
+ }
38
+ };
39
+ };
40
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"throttleByAnimationFrame.js","sourceRoot":"","sources":["../../src/_util/throttleByAnimationFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAA4B;IAC3E,IAAI,SAAwB,CAAC;IAE7B,MAAM,KAAK,GAAG,CAAC,IAAW,EAAE,EAAE,CAAC,GAAG,EAAE;QAClC,SAAS,GAAG,IAAI,CAAC;QACjB,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;QACnC,IAAI,SAAS,IAAI,IAAI,EAAE;YACrB,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC;IAED,SAAiB,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,SAAU,CAAC,CAAC;IAEzD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,iCAAiC;IAC/C,sCAAsC;IACtC,OAAO,UAAS,MAAW,EAAE,GAAW,EAAE,UAAe;QACvD,MAAM,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC;QAC5B,IAAI,gBAAgB,GAAG,KAAK,CAAC;QAC7B,OAAO;YACL,YAAY,EAAE,IAAI;YAClB,GAAG;gBACD,iDAAiD;gBACjD,IAAI,gBAAgB,IAAI,IAAI,KAAK,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBAC7E,OAAO,EAAE,CAAC;iBACX;gBAED,MAAM,OAAO,GAAG,wBAAwB,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBACxD,gBAAgB,GAAG,IAAI,CAAC;gBACxB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE;oBAC/B,KAAK,EAAE,OAAO;oBACd,YAAY,EAAE,IAAI;oBAClB,QAAQ,EAAE,IAAI;iBACf,CAAC,CAAC;gBACH,gBAAgB,GAAG,KAAK,CAAC;gBACzB,OAAO,OAAO,CAAC;YACjB,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import raf from 'raf';\n\nexport default function throttleByAnimationFrame(fn: (...args: any[]) => void) {\n let requestId: number | null;\n\n const later = (args: any[]) => () => {\n requestId = null;\n fn(...args);\n };\n\n const throttled = (...args: any[]) => {\n if (requestId == null) {\n requestId = raf(later(args));\n }\n };\n\n (throttled as any).cancel = () => raf.cancel(requestId!);\n\n return throttled;\n}\n\nexport function throttleByAnimationFrameDecorator() {\n // eslint-disable-next-line func-names\n return function(target: any, key: string, descriptor: any) {\n const fn = descriptor.value;\n let definingProperty = false;\n return {\n configurable: true,\n get() {\n // eslint-disable-next-line no-prototype-builtins\n if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {\n return fn;\n }\n\n const boundFn = throttleByAnimationFrame(fn.bind(this));\n definingProperty = true;\n Object.defineProperty(this, key, {\n value: boundFn,\n configurable: true,\n writable: true,\n });\n definingProperty = false;\n return boundFn;\n },\n };\n };\n}\n"]}
@@ -0,0 +1,103 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
8
+ };
9
+ /**
10
+ * Wrap of sub component which need use as Button capacity (like Icon component).
11
+ * This helps accessibility reader to tread as a interactive button to operation.
12
+ */
13
+ import * as React from 'react';
14
+ import KeyCode from 'rc-util/lib/KeyCode';
15
+ const inlineStyle = {
16
+ border: 0,
17
+ background: 'transparent',
18
+ padding: 0,
19
+ lineHeight: 'inherit',
20
+ display: 'inline-block'
21
+ };
22
+ class TransButton extends React.Component {
23
+ constructor() {
24
+ super(...arguments);
25
+ Object.defineProperty(this, "div", {
26
+ enumerable: true,
27
+ configurable: true,
28
+ writable: true,
29
+ value: void 0
30
+ });
31
+ Object.defineProperty(this, "lastKeyCode", {
32
+ enumerable: true,
33
+ configurable: true,
34
+ writable: true,
35
+ value: void 0
36
+ });
37
+ Object.defineProperty(this, "onKeyDown", {
38
+ enumerable: true,
39
+ configurable: true,
40
+ writable: true,
41
+ value: event => {
42
+ const {
43
+ keyCode
44
+ } = event;
45
+ if (keyCode === KeyCode.ENTER) {
46
+ event.preventDefault();
47
+ }
48
+ }
49
+ });
50
+ Object.defineProperty(this, "onKeyUp", {
51
+ enumerable: true,
52
+ configurable: true,
53
+ writable: true,
54
+ value: event => {
55
+ const {
56
+ keyCode
57
+ } = event;
58
+ const {
59
+ onClick
60
+ } = this.props;
61
+ if (keyCode === KeyCode.ENTER && onClick) {
62
+ onClick();
63
+ }
64
+ }
65
+ });
66
+ Object.defineProperty(this, "setRef", {
67
+ enumerable: true,
68
+ configurable: true,
69
+ writable: true,
70
+ value: btn => {
71
+ this.div = btn;
72
+ }
73
+ });
74
+ }
75
+ focus() {
76
+ if (this.div) {
77
+ this.div.focus();
78
+ }
79
+ }
80
+ blur() {
81
+ if (this.div) {
82
+ this.div.blur();
83
+ }
84
+ }
85
+ render() {
86
+ const _a = this.props,
87
+ {
88
+ style,
89
+ noStyle
90
+ } = _a,
91
+ restProps = __rest(_a, ["style", "noStyle"]);
92
+ return React.createElement("div", Object.assign({
93
+ role: "button",
94
+ tabIndex: 0,
95
+ ref: this.setRef
96
+ }, restProps, {
97
+ onKeyDown: this.onKeyDown,
98
+ onKeyUp: this.onKeyUp,
99
+ style: Object.assign(Object.assign({}, !noStyle ? inlineStyle : null), style)
100
+ }));
101
+ }
102
+ }
103
+ export default TransButton;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transButton.js","sourceRoot":"","sources":["../../src/_util/transButton.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;GAGG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAO1C,MAAM,WAAW,GAAwB;IACvC,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,aAAa;IACzB,OAAO,EAAE,CAAC;IACV,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,cAAc;CACxB,CAAC;AAEF,MAAM,WAAY,SAAQ,KAAK,CAAC,SAA2B;IAA3D;;QACE;;;;;WAAqB;QAErB;;;;;WAAqB;QAErB;;;;mBAAwD,KAAK,CAAC,EAAE;gBAC9D,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;gBAC1B,IAAI,OAAO,KAAK,OAAO,CAAC,KAAK,EAAE;oBAC7B,KAAK,CAAC,cAAc,EAAE,CAAC;iBACxB;YACH,CAAC;WAAC;QAEF;;;;mBAAsD,KAAK,CAAC,EAAE;gBAC5D,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;gBAC1B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;gBAC/B,IAAI,OAAO,KAAK,OAAO,CAAC,KAAK,IAAI,OAAO,EAAE;oBACxC,OAAO,EAAE,CAAC;iBACX;YACH,CAAC;WAAC;QAEF;;;;mBAAS,CAAC,GAAmB,EAAE,EAAE;gBAC/B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,CAAC;WAAC;IA6BJ,CAAC;IA3BC,KAAK;QACH,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;SAClB;IACH,CAAC;IAED,IAAI;QACF,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACjB;IACH,CAAC;IAED,MAAM;QACJ,MAAM,KAAmC,IAAI,CAAC,KAAK,EAA7C,EAAE,KAAK,EAAE,OAAO,OAA6B,EAAxB,SAAS,cAA9B,oBAAgC,CAAa,CAAC;QAEpD,OAAO,CACL,2CACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,IAAI,CAAC,MAAM,IACZ,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,kCAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,GAAK,KAAK,KACrD,CACH,CAAC;IACJ,CAAC;CACF;AAED,eAAe,WAAW,CAAC","sourcesContent":["/**\n * Wrap of sub component which need use as Button capacity (like Icon component).\n * This helps accessibility reader to tread as a interactive button to operation.\n */\nimport * as React from 'react';\nimport KeyCode from 'rc-util/lib/KeyCode';\n\ninterface TransButtonProps extends React.HTMLAttributes<HTMLDivElement> {\n onClick?: (e?: React.MouseEvent<HTMLDivElement>) => void;\n noStyle?: boolean;\n}\n\nconst inlineStyle: React.CSSProperties = {\n border: 0,\n background: 'transparent',\n padding: 0,\n lineHeight: 'inherit',\n display: 'inline-block',\n};\n\nclass TransButton extends React.Component<TransButtonProps> {\n div?: HTMLDivElement;\n\n lastKeyCode?: number;\n\n onKeyDown: React.KeyboardEventHandler<HTMLDivElement> = event => {\n const { keyCode } = event;\n if (keyCode === KeyCode.ENTER) {\n event.preventDefault();\n }\n };\n\n onKeyUp: React.KeyboardEventHandler<HTMLDivElement> = event => {\n const { keyCode } = event;\n const { onClick } = this.props;\n if (keyCode === KeyCode.ENTER && onClick) {\n onClick();\n }\n };\n\n setRef = (btn: HTMLDivElement) => {\n this.div = btn;\n };\n\n focus() {\n if (this.div) {\n this.div.focus();\n }\n }\n\n blur() {\n if (this.div) {\n this.div.blur();\n }\n }\n\n render() {\n const { style, noStyle, ...restProps } = this.props;\n\n return (\n <div\n role=\"button\"\n tabIndex={0}\n ref={this.setRef}\n {...restProps}\n onKeyDown={this.onKeyDown}\n onKeyUp={this.onKeyUp}\n style={{ ...(!noStyle ? inlineStyle : null), ...style }}\n />\n );\n }\n}\n\nexport default TransButton;\n"]}
@@ -0,0 +1,8 @@
1
+ export default function triggerEvent(el, type) {
2
+ if ('createEvent' in document) {
3
+ // modern browsers, IE9+
4
+ const e = document.createEvent('HTMLEvents');
5
+ e.initEvent(type, false, true);
6
+ el.dispatchEvent(e);
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triggerEvent.js","sourceRoot":"","sources":["../../src/_util/triggerEvent.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAW,EAAE,IAAY;IAC5D,IAAI,aAAa,IAAI,QAAQ,EAAE;QAC7B,wBAAwB;QACxB,MAAM,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAC7C,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC/B,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;KACrB;AACH,CAAC","sourcesContent":["export default function triggerEvent(el: Element, type: string) {\n if ('createEvent' in document) {\n // modern browsers, IE9+\n const e = document.createEvent('HTMLEvents');\n e.initEvent(type, false, true);\n el.dispatchEvent(e);\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ // https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead
2
+ export const tuple = (...args) => args;
3
+ export const tupleNum = (...args) => args;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/_util/type.ts"],"names":[],"mappings":"AACA,qHAAqH;AACrH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAqB,GAAG,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC;AAE9D,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAqB,GAAG,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC","sourcesContent":["export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\n// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead\nexport const tuple = <T extends string[]>(...args: T) => args;\n\nexport const tupleNum = <T extends number[]>(...args: T) => args;\n"]}
@@ -0,0 +1,5 @@
1
+ import warning, { resetWarned } from 'rc-util/lib/warning';
2
+ export { resetWarned };
3
+ export default ((valid, component, message) => {
4
+ warning(valid, `[antd: ${component}] ${message}`);
5
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"warning.js","sourceRoot":"","sources":["../../src/_util/warning.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,eAAe,CAAC,KAAc,EAAE,SAAiB,EAAE,OAAe,EAAQ,EAAE;IAC1E,OAAO,CAAC,KAAK,EAAE,UAAU,SAAS,KAAK,OAAO,EAAE,CAAC,CAAC;AACpD,CAAC,CAAC","sourcesContent":["import warning, { resetWarned } from 'rc-util/lib/warning';\n\nexport { resetWarned };\n\nexport default (valid: boolean, component: string, message: string): void => {\n warning(valid, `[antd: ${component}] ${message}`);\n};\n"]}