tntd 2.6.8 → 2.6.10

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 (451) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +72 -0
  3. package/es/actions/index.js +26 -0
  4. package/es/actions/index.js.map +1 -0
  5. package/es/actions/index.less +70 -0
  6. package/es/cascader/index.js +5 -1
  7. package/es/cascader/index.js.map +1 -1
  8. package/es/check-card/group.js +197 -0
  9. package/es/check-card/group.js.map +1 -0
  10. package/es/check-card/index.js +163 -0
  11. package/es/check-card/index.js.map +1 -0
  12. package/es/check-card/index.less +179 -0
  13. package/es/checkbox/checkbox-group.js +5 -0
  14. package/es/checkbox/checkbox-group.js.map +1 -0
  15. package/es/checkbox/index.js +5 -0
  16. package/es/checkbox/index.js.map +1 -1
  17. package/es/color-picker/ColorPicker.js +1 -1
  18. package/es/color-picker/ColorPicker.js.map +1 -1
  19. package/es/color-picker/index.less +1 -1
  20. package/es/config-provider/DisabledContext.js +12 -0
  21. package/es/config-provider/DisabledContext.js.map +1 -0
  22. package/es/config-provider/SizeContext.js +9 -0
  23. package/es/config-provider/SizeContext.js.map +1 -0
  24. package/es/config-provider/index.js +4 -0
  25. package/es/config-provider/index.js.map +1 -1
  26. package/es/connect/index.js +29 -0
  27. package/es/connect/index.js.map +1 -0
  28. package/es/date-picker/index.js +15 -1
  29. package/es/date-picker/index.js.map +1 -1
  30. package/es/ellipsis/index.js +1 -1
  31. package/es/ellipsis/index.js.map +1 -1
  32. package/es/ellipsis/index.less +1 -1
  33. package/es/handle/index.js +13 -5
  34. package/es/handle/index.js.map +1 -1
  35. package/es/handle/index.less +1 -1
  36. package/es/index.js +8 -1
  37. package/es/index.js.map +1 -1
  38. package/es/index.less +5 -0
  39. package/es/input/input.js +19 -10
  40. package/es/input/input.js.map +1 -1
  41. package/es/input-number/index.js +3 -1
  42. package/es/input-number/index.js.map +1 -1
  43. package/es/label/label.js +140 -0
  44. package/es/label/label.js.map +1 -0
  45. package/es/label/label.test.js +12 -0
  46. package/es/label/label.test.js.map +1 -0
  47. package/es/locale/en_US.js +4 -2
  48. package/es/locale/en_US.js.map +1 -1
  49. package/es/locale/zh_CN.js +4 -2
  50. package/es/locale/zh_CN.js.map +1 -1
  51. package/es/page/Box.js +1 -1
  52. package/es/page/Box.js.map +1 -1
  53. package/es/page/index.js +1 -1
  54. package/es/page/index.js.map +1 -1
  55. package/es/page/index.less +5 -5
  56. package/es/preview-text/index.js +265 -0
  57. package/es/preview-text/index.js.map +1 -0
  58. package/es/preview-text/index.less +3 -0
  59. package/es/query-form/Field/SelectInput.js +7 -5
  60. package/es/query-form/Field/SelectInput.js.map +1 -1
  61. package/es/radio/index.js +3 -0
  62. package/es/radio/index.js.map +1 -1
  63. package/es/radio/radio-group.js +5 -0
  64. package/es/radio/radio-group.js.map +1 -0
  65. package/es/segmented/index.js +67 -0
  66. package/es/segmented/index.js.map +1 -0
  67. package/es/segmented/index.less +138 -0
  68. package/es/select/index.js.map +1 -1
  69. package/es/select/select.js +25 -3
  70. package/es/select/select.js.map +1 -1
  71. package/es/switch/index.js +2 -3
  72. package/es/switch/index.js.map +1 -1
  73. package/es/switch/switch.js +10 -0
  74. package/es/switch/switch.js.map +1 -0
  75. package/es/table/table.js +10 -4
  76. package/es/table/table.js.map +1 -1
  77. package/es/table/total-shower.js +10 -0
  78. package/es/table/total-shower.js.map +1 -0
  79. package/es/time-picker/index.js +3 -1
  80. package/es/time-picker/index.js.map +1 -1
  81. package/es/title/index.js +9 -11
  82. package/es/title/index.js.map +1 -1
  83. package/es/title/index.less +10 -10
  84. package/es/tntd-form/ErrorList.js +87 -0
  85. package/es/tntd-form/ErrorList.js.map +1 -0
  86. package/es/tntd-form/Form.js +122 -0
  87. package/es/tntd-form/Form.js.map +1 -0
  88. package/es/tntd-form/FormItem/ItemHolder.js +144 -0
  89. package/es/tntd-form/FormItem/ItemHolder.js.map +1 -0
  90. package/es/tntd-form/FormItem/index.js +264 -0
  91. package/es/tntd-form/FormItem/index.js.map +1 -0
  92. package/es/tntd-form/FormItemInput.js +79 -0
  93. package/es/tntd-form/FormItemInput.js.map +1 -0
  94. package/es/tntd-form/FormItemLabel.js +98 -0
  95. package/es/tntd-form/FormItemLabel.js.map +1 -0
  96. package/es/tntd-form/FormList.js +40 -0
  97. package/es/tntd-form/FormList.js.map +1 -0
  98. package/es/tntd-form/_util/motion.js +47 -0
  99. package/es/tntd-form/_util/motion.js.map +1 -0
  100. package/es/tntd-form/_util/reactNode.js +16 -0
  101. package/es/tntd-form/_util/reactNode.js.map +1 -0
  102. package/es/tntd-form/_util/scrollTo.js +35 -0
  103. package/es/tntd-form/_util/scrollTo.js.map +1 -0
  104. package/es/tntd-form/_util/type.js +3 -0
  105. package/es/tntd-form/_util/type.js.map +1 -0
  106. package/es/tntd-form/_util/warning.js +5 -0
  107. package/es/tntd-form/_util/warning.js.map +1 -0
  108. package/es/tntd-form/_util/wave.js +168 -0
  109. package/es/tntd-form/_util/wave.js.map +1 -0
  110. package/es/tntd-form/context.js +40 -0
  111. package/es/tntd-form/context.js.map +1 -0
  112. package/es/tntd-form/hooks/useDebounce.js +13 -0
  113. package/es/tntd-form/hooks/useDebounce.js.map +1 -0
  114. package/es/tntd-form/hooks/useForm.js +40 -0
  115. package/es/tntd-form/hooks/useForm.js.map +1 -0
  116. package/es/tntd-form/hooks/useFormInstance.js +8 -0
  117. package/es/tntd-form/hooks/useFormInstance.js.map +1 -0
  118. package/es/tntd-form/hooks/useFormItemStatus.js +13 -0
  119. package/es/tntd-form/hooks/useFormItemStatus.js.map +1 -0
  120. package/es/tntd-form/hooks/useFrameState.js +37 -0
  121. package/es/tntd-form/hooks/useFrameState.js.map +1 -0
  122. package/es/tntd-form/hooks/useItemRef.js +20 -0
  123. package/es/tntd-form/hooks/useItemRef.js.map +1 -0
  124. package/es/tntd-form/index.js +17 -1
  125. package/es/tntd-form/index.js.map +1 -1
  126. package/es/tntd-form/interface.js +2 -0
  127. package/es/tntd-form/interface.js.map +1 -0
  128. package/es/tntd-form/style/components.less +16 -0
  129. package/es/tntd-form/style/horizontal.less +26 -0
  130. package/es/tntd-form/style/index.js +5 -0
  131. package/es/tntd-form/style/index.js.map +1 -0
  132. package/es/tntd-form/style/index.less +342 -0
  133. package/es/tntd-form/style/inline.less +40 -0
  134. package/es/tntd-form/style/mixin.less +90 -0
  135. package/es/tntd-form/style/rtl.less +204 -0
  136. package/es/tntd-form/style/status.less +45 -0
  137. package/es/tntd-form/style/vertical.less +95 -0
  138. package/es/tntd-form/tntd-form.stories.js +786 -0
  139. package/es/tntd-form/tntd-form.stories.js.map +1 -0
  140. package/es/tntd-form/util.js +18 -0
  141. package/es/tntd-form/util.js.map +1 -0
  142. package/es/tntd-form/validateMessagesContext.js +5 -0
  143. package/es/tntd-form/validateMessagesContext.js.map +1 -0
  144. package/es/tntd-modal/index.js +71 -56
  145. package/es/tntd-modal/index.js.map +1 -1
  146. package/es/tntd-modal/index.less +83 -63
  147. package/es/tree-select/index.js +4 -1
  148. package/es/tree-select/index.js.map +1 -1
  149. package/es/upload/index.js +8 -1
  150. package/es/upload/index.js.map +1 -1
  151. package/es/utils/index.js +1 -0
  152. package/es/utils/index.js.map +1 -1
  153. package/es/utils/simple-template.js +10 -0
  154. package/es/utils/simple-template.js.map +1 -0
  155. package/es/water-mark/index.js +110 -0
  156. package/es/water-mark/index.js.map +1 -0
  157. package/lib/actions/index.d.ts +15 -0
  158. package/lib/actions/index.d.ts.map +1 -0
  159. package/lib/actions/index.js +34 -0
  160. package/lib/actions/index.js.map +1 -0
  161. package/lib/actions/index.less +70 -0
  162. package/lib/cascader/index.d.ts +6 -1
  163. package/lib/cascader/index.d.ts.map +1 -1
  164. package/lib/cascader/index.js +10 -3
  165. package/lib/cascader/index.js.map +1 -1
  166. package/lib/check-card/group.d.ts +130 -0
  167. package/lib/check-card/group.d.ts.map +1 -0
  168. package/lib/check-card/group.js +236 -0
  169. package/lib/check-card/group.js.map +1 -0
  170. package/lib/check-card/index.d.ts +136 -0
  171. package/lib/check-card/index.d.ts.map +1 -0
  172. package/lib/check-card/index.js +178 -0
  173. package/lib/check-card/index.js.map +1 -0
  174. package/lib/check-card/index.less +179 -0
  175. package/lib/checkbox/checkbox-group.d.ts +8 -0
  176. package/lib/checkbox/checkbox-group.d.ts.map +1 -0
  177. package/lib/checkbox/checkbox-group.js +13 -0
  178. package/lib/checkbox/checkbox-group.js.map +1 -0
  179. package/lib/checkbox/index.d.ts +1 -0
  180. package/lib/checkbox/index.d.ts.map +1 -1
  181. package/lib/checkbox/index.js +16 -0
  182. package/lib/checkbox/index.js.map +1 -1
  183. package/lib/color-picker/ColorPicker.js +1 -1
  184. package/lib/color-picker/ColorPicker.js.map +1 -1
  185. package/lib/color-picker/index.less +1 -1
  186. package/lib/config-provider/DisabledContext.d.ts +10 -0
  187. package/lib/config-provider/DisabledContext.d.ts.map +1 -0
  188. package/lib/config-provider/DisabledContext.js +22 -0
  189. package/lib/config-provider/DisabledContext.js.map +1 -0
  190. package/lib/config-provider/SizeContext.d.ts +10 -0
  191. package/lib/config-provider/SizeContext.d.ts.map +1 -0
  192. package/lib/config-provider/SizeContext.js +23 -0
  193. package/lib/config-provider/SizeContext.js.map +1 -0
  194. package/lib/config-provider/index.d.ts +1 -0
  195. package/lib/config-provider/index.d.ts.map +1 -1
  196. package/lib/config-provider/index.js +15 -0
  197. package/lib/config-provider/index.js.map +1 -1
  198. package/lib/connect/index.d.ts +12 -0
  199. package/lib/connect/index.d.ts.map +1 -0
  200. package/lib/connect/index.js +50 -0
  201. package/lib/connect/index.js.map +1 -0
  202. package/lib/date-picker/index.d.ts +6 -1
  203. package/lib/date-picker/index.d.ts.map +1 -1
  204. package/lib/date-picker/index.js +29 -3
  205. package/lib/date-picker/index.js.map +1 -1
  206. package/lib/ellipsis/index.js +1 -1
  207. package/lib/ellipsis/index.js.map +1 -1
  208. package/lib/ellipsis/index.less +1 -1
  209. package/lib/handle/index.d.ts.map +1 -1
  210. package/lib/handle/index.js +13 -4
  211. package/lib/handle/index.js.map +1 -1
  212. package/lib/handle/index.less +1 -1
  213. package/lib/index.d.ts +7 -0
  214. package/lib/index.d.ts.map +1 -1
  215. package/lib/index.js +22 -0
  216. package/lib/index.js.map +1 -1
  217. package/lib/index.less +5 -0
  218. package/lib/input/input.d.ts +5 -0
  219. package/lib/input/input.d.ts.map +1 -1
  220. package/lib/input/input.js +18 -8
  221. package/lib/input/input.js.map +1 -1
  222. package/lib/input-number/index.d.ts +7 -2
  223. package/lib/input-number/index.d.ts.map +1 -1
  224. package/lib/input-number/index.js +4 -1
  225. package/lib/input-number/index.js.map +1 -1
  226. package/lib/label/label.d.ts +52 -0
  227. package/lib/label/label.d.ts.map +1 -0
  228. package/lib/label/label.js +150 -0
  229. package/lib/label/label.js.map +1 -0
  230. package/lib/label/label.test.d.ts +2 -0
  231. package/lib/label/label.test.d.ts.map +1 -0
  232. package/lib/label/label.test.js +14 -0
  233. package/lib/label/label.test.js.map +1 -0
  234. package/lib/locale/default.d.ts +1 -0
  235. package/lib/locale/default.d.ts.map +1 -1
  236. package/lib/locale/en_US.d.ts +1 -0
  237. package/lib/locale/en_US.d.ts.map +1 -1
  238. package/lib/locale/en_US.js +4 -2
  239. package/lib/locale/en_US.js.map +1 -1
  240. package/lib/locale/zh_CN.d.ts +1 -0
  241. package/lib/locale/zh_CN.d.ts.map +1 -1
  242. package/lib/locale/zh_CN.js +4 -2
  243. package/lib/locale/zh_CN.js.map +1 -1
  244. package/lib/page/Box.js +1 -1
  245. package/lib/page/Box.js.map +1 -1
  246. package/lib/page/index.js +1 -1
  247. package/lib/page/index.js.map +1 -1
  248. package/lib/page/index.less +5 -5
  249. package/lib/preview-text/index.d.ts +20 -0
  250. package/lib/preview-text/index.d.ts.map +1 -0
  251. package/lib/preview-text/index.js +278 -0
  252. package/lib/preview-text/index.js.map +1 -0
  253. package/lib/preview-text/index.less +3 -0
  254. package/lib/query-form/Field/SelectInput.d.ts.map +1 -1
  255. package/lib/query-form/Field/SelectInput.js +6 -4
  256. package/lib/query-form/Field/SelectInput.js.map +1 -1
  257. package/lib/radio/index.d.ts.map +1 -1
  258. package/lib/radio/index.js +4 -0
  259. package/lib/radio/index.js.map +1 -1
  260. package/lib/radio/radio-group.d.ts +8 -0
  261. package/lib/radio/radio-group.d.ts.map +1 -0
  262. package/lib/radio/radio-group.js +13 -0
  263. package/lib/radio/radio-group.js.map +1 -0
  264. package/lib/segmented/index.d.ts +23 -0
  265. package/lib/segmented/index.d.ts.map +1 -0
  266. package/lib/segmented/index.js +80 -0
  267. package/lib/segmented/index.js.map +1 -0
  268. package/lib/segmented/index.less +138 -0
  269. package/lib/select/index.d.ts +2 -1
  270. package/lib/select/index.d.ts.map +1 -1
  271. package/lib/select/index.js.map +1 -1
  272. package/lib/select/select.d.ts +12 -0
  273. package/lib/select/select.d.ts.map +1 -1
  274. package/lib/select/select.js +25 -4
  275. package/lib/select/select.js.map +1 -1
  276. package/lib/svg-components/illustration-403.d.ts +1 -1
  277. package/lib/svg-components/illustration-404.d.ts +1 -1
  278. package/lib/svg-components/illustration-500.d.ts +1 -1
  279. package/lib/svg-components/illustration-empty.d.ts +1 -1
  280. package/lib/svg-components/illustration-failure.d.ts +1 -1
  281. package/lib/svg-components/illustration-no-access.d.ts +1 -1
  282. package/lib/svg-components/illustration-no-chart.d.ts +1 -1
  283. package/lib/svg-components/illustration-no-result.d.ts +1 -1
  284. package/lib/svg-components/illustration-offline.d.ts +1 -1
  285. package/lib/svg-components/illustration-success.d.ts +1 -1
  286. package/lib/switch/index.d.ts +2 -3
  287. package/lib/switch/index.d.ts.map +1 -1
  288. package/lib/switch/index.js +1 -2
  289. package/lib/switch/index.js.map +1 -1
  290. package/lib/switch/switch.d.ts +10 -0
  291. package/lib/switch/switch.d.ts.map +1 -0
  292. package/lib/switch/switch.js +37 -0
  293. package/lib/switch/switch.js.map +1 -0
  294. package/lib/table/assets/image-loading-background.d.ts +1 -1
  295. package/lib/table/assets/image-loading.d.ts +1 -1
  296. package/lib/table/table.d.ts.map +1 -1
  297. package/lib/table/table.js +14 -7
  298. package/lib/table/table.js.map +1 -1
  299. package/lib/table/total-shower.d.ts +9 -0
  300. package/lib/table/total-shower.d.ts.map +1 -0
  301. package/lib/table/total-shower.js +17 -0
  302. package/lib/table/total-shower.js.map +1 -0
  303. package/lib/time-picker/index.d.ts +7 -2
  304. package/lib/time-picker/index.d.ts.map +1 -1
  305. package/lib/time-picker/index.js +3 -1
  306. package/lib/time-picker/index.js.map +1 -1
  307. package/lib/title/index.d.ts +11 -1
  308. package/lib/title/index.d.ts.map +1 -1
  309. package/lib/title/index.js +8 -10
  310. package/lib/title/index.js.map +1 -1
  311. package/lib/title/index.less +10 -10
  312. package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +1 -1
  313. package/lib/tntd-form/ErrorList.d.ts +13 -0
  314. package/lib/tntd-form/ErrorList.d.ts.map +1 -0
  315. package/lib/tntd-form/ErrorList.js +104 -0
  316. package/lib/tntd-form/ErrorList.js.map +1 -0
  317. package/lib/tntd-form/Form.d.ts +36 -0
  318. package/lib/tntd-form/Form.d.ts.map +1 -0
  319. package/lib/tntd-form/Form.js +160 -0
  320. package/lib/tntd-form/Form.js.map +1 -0
  321. package/lib/tntd-form/FormItem/ItemHolder.d.ts +18 -0
  322. package/lib/tntd-form/FormItem/ItemHolder.d.ts.map +1 -0
  323. package/lib/tntd-form/FormItem/ItemHolder.js +163 -0
  324. package/lib/tntd-form/FormItem/ItemHolder.js.map +1 -0
  325. package/lib/tntd-form/FormItem/index.d.ts +36 -0
  326. package/lib/tntd-form/FormItem/index.d.ts.map +1 -0
  327. package/lib/tntd-form/FormItem/index.js +301 -0
  328. package/lib/tntd-form/FormItem/index.js.map +1 -0
  329. package/lib/tntd-form/FormItemInput.d.ts +30 -0
  330. package/lib/tntd-form/FormItemInput.d.ts.map +1 -0
  331. package/lib/tntd-form/FormItemInput.js +92 -0
  332. package/lib/tntd-form/FormItemInput.js.map +1 -0
  333. package/lib/tntd-form/FormItemLabel.d.ts +24 -0
  334. package/lib/tntd-form/FormItemLabel.d.ts.map +1 -0
  335. package/lib/tntd-form/FormItemLabel.js +106 -0
  336. package/lib/tntd-form/FormItemLabel.js.map +1 -0
  337. package/lib/tntd-form/FormList.d.ts +26 -0
  338. package/lib/tntd-form/FormList.d.ts.map +1 -0
  339. package/lib/tntd-form/FormList.js +56 -0
  340. package/lib/tntd-form/FormList.js.map +1 -0
  341. package/lib/tntd-form/_util/motion.d.ts +9 -0
  342. package/lib/tntd-form/_util/motion.d.ts.map +1 -0
  343. package/lib/tntd-form/_util/motion.js +59 -0
  344. package/lib/tntd-form/_util/motion.js.map +1 -0
  345. package/lib/tntd-form/_util/reactNode.d.ts +9 -0
  346. package/lib/tntd-form/_util/reactNode.d.ts.map +1 -0
  347. package/lib/tntd-form/_util/reactNode.js +27 -0
  348. package/lib/tntd-form/_util/reactNode.js.map +1 -0
  349. package/lib/tntd-form/_util/scrollTo.d.ts +1 -0
  350. package/lib/tntd-form/_util/scrollTo.d.ts.map +1 -0
  351. package/lib/tntd-form/_util/scrollTo.js +35 -0
  352. package/lib/tntd-form/_util/scrollTo.js.map +1 -0
  353. package/lib/tntd-form/_util/type.d.ts +4 -0
  354. package/lib/tntd-form/_util/type.d.ts.map +1 -0
  355. package/lib/tntd-form/_util/type.js +21 -0
  356. package/lib/tntd-form/_util/type.js.map +1 -0
  357. package/lib/tntd-form/_util/warning.d.ts +5 -0
  358. package/lib/tntd-form/_util/warning.d.ts.map +1 -0
  359. package/lib/tntd-form/_util/warning.js +20 -0
  360. package/lib/tntd-form/_util/warning.js.map +1 -0
  361. package/lib/tntd-form/_util/wave.d.ts +1 -0
  362. package/lib/tntd-form/_util/wave.d.ts.map +1 -0
  363. package/lib/tntd-form/_util/wave.js +168 -0
  364. package/lib/tntd-form/_util/wave.js.map +1 -0
  365. package/lib/tntd-form/context.d.ts +51 -0
  366. package/lib/tntd-form/context.d.ts.map +1 -0
  367. package/lib/tntd-form/context.js +54 -0
  368. package/lib/tntd-form/context.js.map +1 -0
  369. package/lib/tntd-form/hooks/useDebounce.d.ts +2 -0
  370. package/lib/tntd-form/hooks/useDebounce.d.ts.map +1 -0
  371. package/lib/tntd-form/hooks/useDebounce.js +31 -0
  372. package/lib/tntd-form/hooks/useDebounce.js.map +1 -0
  373. package/lib/tntd-form/hooks/useForm.d.ts +16 -0
  374. package/lib/tntd-form/hooks/useForm.d.ts.map +1 -0
  375. package/lib/tntd-form/hooks/useForm.js +63 -0
  376. package/lib/tntd-form/hooks/useForm.js.map +1 -0
  377. package/lib/tntd-form/hooks/useFormInstance.d.ts +3 -0
  378. package/lib/tntd-form/hooks/useFormInstance.d.ts.map +1 -0
  379. package/lib/tntd-form/hooks/useFormInstance.js +13 -0
  380. package/lib/tntd-form/hooks/useFormInstance.js.map +1 -0
  381. package/lib/tntd-form/hooks/useFormItemStatus.d.ts +7 -0
  382. package/lib/tntd-form/hooks/useFormItemStatus.d.ts.map +1 -0
  383. package/lib/tntd-form/hooks/useFormItemStatus.js +20 -0
  384. package/lib/tntd-form/hooks/useFormItemStatus.js.map +1 -0
  385. package/lib/tntd-form/hooks/useFrameState.d.ts +4 -0
  386. package/lib/tntd-form/hooks/useFrameState.d.ts.map +1 -0
  387. package/lib/tntd-form/hooks/useFrameState.js +55 -0
  388. package/lib/tntd-form/hooks/useFrameState.js.map +1 -0
  389. package/lib/tntd-form/hooks/useItemRef.d.ts +4 -0
  390. package/lib/tntd-form/hooks/useItemRef.d.ts.map +1 -0
  391. package/lib/tntd-form/hooks/useItemRef.js +28 -0
  392. package/lib/tntd-form/hooks/useItemRef.js.map +1 -0
  393. package/lib/tntd-form/index.d.ts +23 -1
  394. package/lib/tntd-form/index.d.ts.map +1 -1
  395. package/lib/tntd-form/index.js +24 -8
  396. package/lib/tntd-form/index.js.map +1 -1
  397. package/lib/tntd-form/interface.d.ts +4 -0
  398. package/lib/tntd-form/interface.d.ts.map +1 -0
  399. package/lib/tntd-form/interface.js +7 -0
  400. package/lib/tntd-form/interface.js.map +1 -0
  401. package/lib/tntd-form/style/components.less +16 -0
  402. package/lib/tntd-form/style/horizontal.less +26 -0
  403. package/lib/tntd-form/style/index.d.ts +5 -0
  404. package/lib/tntd-form/style/index.d.ts.map +1 -0
  405. package/lib/tntd-form/style/index.js +6 -0
  406. package/lib/tntd-form/style/index.js.map +1 -0
  407. package/lib/tntd-form/style/index.less +342 -0
  408. package/lib/tntd-form/style/inline.less +40 -0
  409. package/lib/tntd-form/style/mixin.less +90 -0
  410. package/lib/tntd-form/style/rtl.less +204 -0
  411. package/lib/tntd-form/style/status.less +45 -0
  412. package/lib/tntd-form/style/vertical.less +95 -0
  413. package/lib/tntd-form/tntd-form.stories.d.ts +33 -0
  414. package/lib/tntd-form/tntd-form.stories.d.ts.map +1 -0
  415. package/lib/tntd-form/tntd-form.stories.js +888 -0
  416. package/lib/tntd-form/tntd-form.stories.js.map +1 -0
  417. package/lib/tntd-form/util.d.ts +4 -0
  418. package/lib/tntd-form/util.d.ts.map +1 -0
  419. package/lib/tntd-form/util.js +25 -0
  420. package/lib/tntd-form/util.js.map +1 -0
  421. package/lib/tntd-form/validateMessagesContext.d.ts +5 -0
  422. package/lib/tntd-form/validateMessagesContext.d.ts.map +1 -0
  423. package/lib/tntd-form/validateMessagesContext.js +12 -0
  424. package/lib/tntd-form/validateMessagesContext.js.map +1 -0
  425. package/lib/tntd-modal/index.d.ts +15 -2
  426. package/lib/tntd-modal/index.d.ts.map +1 -1
  427. package/lib/tntd-modal/index.js +76 -61
  428. package/lib/tntd-modal/index.js.map +1 -1
  429. package/lib/tntd-modal/index.less +83 -63
  430. package/lib/tree-select/index.d.ts +7 -1
  431. package/lib/tree-select/index.d.ts.map +1 -1
  432. package/lib/tree-select/index.js +9 -3
  433. package/lib/tree-select/index.js.map +1 -1
  434. package/lib/upload/index.d.ts +6 -1
  435. package/lib/upload/index.d.ts.map +1 -1
  436. package/lib/upload/index.js +11 -1
  437. package/lib/upload/index.js.map +1 -1
  438. package/lib/utils/index.d.ts +1 -0
  439. package/lib/utils/index.d.ts.map +1 -1
  440. package/lib/utils/index.js +12 -0
  441. package/lib/utils/index.js.map +1 -1
  442. package/lib/utils/simple-template.d.ts +9 -0
  443. package/lib/utils/simple-template.d.ts.map +1 -0
  444. package/lib/utils/simple-template.js +19 -0
  445. package/lib/utils/simple-template.js.map +1 -0
  446. package/lib/water-mark/index.d.ts +49 -0
  447. package/lib/water-mark/index.d.ts.map +1 -0
  448. package/lib/water-mark/index.js +142 -0
  449. package/lib/water-mark/index.js.map +1 -0
  450. package/package.json +26 -5
  451. package/themes/default/variables.less +43 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormInstance.js","sourceRoot":"","sources":["../../../src/tntd-form/hooks/useFormInstance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,MAAM,CAAC,OAAO,UAAU,eAAe;IACrC,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IAExC,OAAO,IAAK,CAAA;AACd,CAAC","sourcesContent":["import { useContext } from 'react'\nimport { FormContext } from '../context'\nimport type { FormInstance } from './useForm'\n\nexport default function useFormInstance<Value = any>(): FormInstance<Value> {\n const { form } = useContext(FormContext)\n\n return form!\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import { useContext } from 'react';
2
+ import { FormItemInputContext } from '../context';
3
+ import warning from '../_util/warning';
4
+ const useFormItemStatus = () => {
5
+ const {
6
+ status
7
+ } = useContext(FormItemInputContext);
8
+ warning(status !== undefined, 'Form.Item', `Form.Item.useStatus should be used under Form.Item component. For more information: ${window.location.protocol}//${window.location.host}/components/form-cn/#Form.Item.useStatus`);
9
+ return {
10
+ status
11
+ };
12
+ };
13
+ export default useFormItemStatus;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormItemStatus.js","sourceRoot":"","sources":["../../../src/tntd-form/hooks/useFormItemStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,OAAO,MAAM,kBAAkB,CAAA;AAMtC,MAAM,iBAAiB,GAAsB,GAAG,EAAE;IAChD,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAA;IAEnD,OAAO,CACL,MAAM,KAAK,SAAS,EACpB,WAAW,EACX,uFAAuF,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,IAAI,0CAA0C,CACnL,CAAA;IAED,OAAO,EAAE,MAAM,EAAE,CAAA;AACnB,CAAC,CAAA;AAED,eAAe,iBAAiB,CAAA","sourcesContent":["import { useContext } from 'react'\nimport type { ValidateStatus } from '../FormItem'\nimport { FormItemInputContext } from '../context'\nimport warning from '../_util/warning'\n\ntype UseFormItemStatus = () => {\n status?: ValidateStatus\n}\n\nconst useFormItemStatus: UseFormItemStatus = () => {\n const { status } = useContext(FormItemInputContext)\n\n warning(\n status !== undefined,\n 'Form.Item',\n `Form.Item.useStatus should be used under Form.Item component. For more information: ${window.location.protocol}//${window.location.host}/components/form-cn/#Form.Item.useStatus`\n )\n\n return { status }\n}\n\nexport default useFormItemStatus\n"]}
@@ -0,0 +1,37 @@
1
+ import raf from 'rc-util/lib/raf';
2
+ import * as React from 'react';
3
+ import { useRef } from 'react';
4
+ export default function useFrameState(defaultValue) {
5
+ const [value, setValue] = React.useState(defaultValue);
6
+ const frameRef = useRef(null);
7
+ const batchRef = useRef([]);
8
+ const destroyRef = useRef(false);
9
+ React.useEffect(() => {
10
+ destroyRef.current = false;
11
+ return () => {
12
+ destroyRef.current = true;
13
+ raf.cancel(frameRef.current);
14
+ frameRef.current = null;
15
+ };
16
+ }, []);
17
+ function setFrameValue(updater) {
18
+ if (destroyRef.current) {
19
+ return;
20
+ }
21
+ if (frameRef.current === null) {
22
+ batchRef.current = [];
23
+ frameRef.current = raf(() => {
24
+ frameRef.current = null;
25
+ setValue(prevValue => {
26
+ let current = prevValue;
27
+ batchRef.current.forEach(func => {
28
+ current = func(current);
29
+ });
30
+ return current;
31
+ });
32
+ });
33
+ }
34
+ batchRef.current.push(updater);
35
+ }
36
+ return [value, setFrameValue];
37
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFrameState.js","sourceRoot":"","sources":["../../../src/tntd-form/hooks/useFrameState.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,iBAAiB,CAAA;AACjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAI9B,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,YAAuB;IAEvB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;IACtD,MAAM,QAAQ,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAA;IAC5C,MAAM,QAAQ,GAAG,MAAM,CAAuB,EAAE,CAAC,CAAA;IACjD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAEhC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,UAAU,CAAC,OAAO,GAAG,KAAK,CAAA;QAC1B,OAAO,GAAG,EAAE;YACV,UAAU,CAAC,OAAO,GAAG,IAAI,CAAA;YACzB,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAQ,CAAC,CAAA;YAC7B,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAA;QACzB,CAAC,CAAA;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,SAAS,aAAa,CAAC,OAA2B;QAChD,IAAI,UAAU,CAAC,OAAO,EAAE;YACtB,OAAM;SACP;QAED,IAAI,QAAQ,CAAC,OAAO,KAAK,IAAI,EAAE;YAC7B,QAAQ,CAAC,OAAO,GAAG,EAAE,CAAA;YACrB,QAAQ,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,EAAE;gBAC1B,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAA;gBACvB,QAAQ,CAAC,CAAC,SAAS,EAAE,EAAE;oBACrB,IAAI,OAAO,GAAG,SAAS,CAAA;oBAEvB,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;wBAChC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAA;oBACzB,CAAC,CAAC,CAAA;oBAEF,OAAO,OAAO,CAAA;gBAChB,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;SACH;QAED,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAChC,CAAC;IAED,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;AAC/B,CAAC","sourcesContent":["import raf from 'rc-util/lib/raf'\nimport * as React from 'react'\nimport { useRef } from 'react'\n\ntype Updater<ValueType> = (prev?: ValueType) => ValueType\n\nexport default function useFrameState<ValueType>(\n defaultValue: ValueType\n): [ValueType, (updater: Updater<ValueType>) => void] {\n const [value, setValue] = React.useState(defaultValue)\n const frameRef = useRef<number | null>(null)\n const batchRef = useRef<Updater<ValueType>[]>([])\n const destroyRef = useRef(false)\n\n React.useEffect(() => {\n destroyRef.current = false\n return () => {\n destroyRef.current = true\n raf.cancel(frameRef.current!)\n frameRef.current = null\n }\n }, [])\n\n function setFrameValue(updater: Updater<ValueType>) {\n if (destroyRef.current) {\n return\n }\n\n if (frameRef.current === null) {\n batchRef.current = []\n frameRef.current = raf(() => {\n frameRef.current = null\n setValue((prevValue) => {\n let current = prevValue\n\n batchRef.current.forEach((func) => {\n current = func(current)\n })\n\n return current\n })\n })\n }\n\n batchRef.current.push(updater)\n }\n\n return [value, setFrameValue]\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { composeRef } from 'rc-util/lib/ref';
2
+ import * as React from 'react';
3
+ import { FormContext } from '../context';
4
+ export default function useItemRef() {
5
+ const {
6
+ itemRef
7
+ } = React.useContext(FormContext);
8
+ const cacheRef = React.useRef({});
9
+ function getRef(name, children) {
10
+ const childrenRef = children && typeof children === 'object' && children.ref;
11
+ const nameStr = name.join('_');
12
+ if (cacheRef.current.name !== nameStr || cacheRef.current.originRef !== childrenRef) {
13
+ cacheRef.current.name = nameStr;
14
+ cacheRef.current.originRef = childrenRef;
15
+ cacheRef.current.ref = composeRef(itemRef(name), childrenRef);
16
+ }
17
+ return cacheRef.current.ref;
18
+ }
19
+ return getRef;
20
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useItemRef.js","sourceRoot":"","sources":["../../../src/tntd-form/hooks/useItemRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,MAAM,CAAC,OAAO,UAAU,UAAU;IAChC,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA;IACjD,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAI1B,EAAE,CAAC,CAAA;IAEN,SAAS,MAAM,CAAC,IAAsB,EAAE,QAAa;QACnD,MAAM,WAAW,GACf,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,GAAG,CAAA;QAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAC9B,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO,IAAI,QAAQ,CAAC,OAAO,CAAC,SAAS,KAAK,WAAW,EAAE;YACnF,QAAQ,CAAC,OAAO,CAAC,IAAI,GAAG,OAAO,CAAA;YAC/B,QAAQ,CAAC,OAAO,CAAC,SAAS,GAAG,WAAW,CAAA;YACxC,QAAQ,CAAC,OAAO,CAAC,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAA;SAC9D;QAED,OAAO,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAA;IAC7B,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["import { composeRef } from 'rc-util/lib/ref'\nimport * as React from 'react'\nimport { FormContext } from '../context'\nimport type { InternalNamePath } from '../interface'\n\nexport default function useItemRef() {\n const { itemRef } = React.useContext(FormContext)\n const cacheRef = React.useRef<{\n name?: string\n originRef?: React.Ref<any>\n ref?: React.Ref<any>\n }>({})\n\n function getRef(name: InternalNamePath, children: any) {\n const childrenRef: React.Ref<React.ReactElement> =\n children && typeof children === 'object' && children.ref\n const nameStr = name.join('_')\n if (cacheRef.current.name !== nameStr || cacheRef.current.originRef !== childrenRef) {\n cacheRef.current.name = nameStr\n cacheRef.current.originRef = childrenRef\n cacheRef.current.ref = composeRef(itemRef(name), childrenRef)\n }\n\n return cacheRef.current.ref\n }\n\n return getRef\n}\n"]}
@@ -1 +1,17 @@
1
- export { default } from './TntdForm';
1
+ // import warning from '../_util/warning';
2
+ import { FormProvider } from './context';
3
+ import ErrorList from './ErrorList';
4
+ import InternalForm, { useForm, useWatch } from './Form';
5
+ import Item from './FormItem';
6
+ import List from './FormList';
7
+ import useFormInstance from './hooks/useFormInstance';
8
+ import './style/index.less';
9
+ const Form = InternalForm;
10
+ Form.Item = Item;
11
+ Form.List = List;
12
+ Form.ErrorList = ErrorList;
13
+ Form.useForm = useForm;
14
+ Form.useFormInstance = useFormInstance;
15
+ Form.useWatch = useWatch;
16
+ Form.Provider = FormProvider;
17
+ export default Form;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tntd-form/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA","sourcesContent":["export { default } from './TntdForm'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tntd-form/index.tsx"],"names":[],"mappings":"AACA,0CAA0C;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,SAA6B,MAAM,aAAa,CAAA;AACvD,OAAO,YAAY,EAAE,EAA2B,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACjF,OAAO,IAAuB,MAAM,YAAY,CAAA;AAChD,OAAO,IAA6D,MAAM,YAAY,CAAA;AACtF,OAAO,eAAe,MAAM,yBAAyB,CAAA;AAErD,OAAO,oBAAoB,CAAA;AAiB3B,MAAM,IAAI,GAAG,YAAmC,CAAA;AAEhD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;AAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;AAChB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;AAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACtB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;AACtC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;AACxB,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAA;AAsB5B,eAAe,IAAI,CAAA","sourcesContent":["import type { Rule, RuleObject, RuleRender } from 'rc-field-form/lib/interface'\n// import warning from '../_util/warning';\nimport { FormProvider } from './context'\nimport ErrorList, { ErrorListProps } from './ErrorList'\nimport InternalForm, { FormInstance, FormProps, useForm, useWatch } from './Form'\nimport Item, { FormItemProps } from './FormItem'\nimport List, { FormListFieldData, FormListOperation, FormListProps } from './FormList'\nimport useFormInstance from './hooks/useFormInstance'\n\nimport './style/index.less'\n\ntype InternalFormType = typeof InternalForm\n\ntype CompoundedComponent = InternalFormType & {\n useForm: typeof useForm\n useFormInstance: typeof useFormInstance\n useWatch: typeof useWatch\n Item: typeof Item\n List: typeof List\n ErrorList: typeof ErrorList\n Provider: typeof FormProvider\n\n /** @deprecated Only for warning usage. Do not use. */\n create: () => void\n}\n\nconst Form = InternalForm as CompoundedComponent\n\nForm.Item = Item\nForm.List = List\nForm.ErrorList = ErrorList\nForm.useForm = useForm\nForm.useFormInstance = useFormInstance\nForm.useWatch = useWatch\nForm.Provider = FormProvider\n// Form.create = () => {\n// warning(\n// false,\n// 'Form',\n// 'antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.',\n// );\n// };\n\nexport {\n FormInstance,\n FormProps,\n FormItemProps,\n ErrorListProps,\n Rule,\n RuleObject,\n RuleRender,\n FormListProps,\n FormListFieldData,\n FormListOperation,\n}\n\nexport default Form\n"]}
@@ -0,0 +1,2 @@
1
+ export {} from 'rc-field-form/lib/interface';
2
+ export {} from 'scroll-into-view-if-needed';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/tntd-form/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,MAAM,6BAA6B,CAAA;AAC3F,OAAO,EAA4B,MAAM,4BAA4B,CAAA","sourcesContent":["export { InternalNamePath, NamePath, Store, StoreValue } from 'rc-field-form/lib/interface'\nexport { Options as ScrollOptions } from 'scroll-into-view-if-needed'\nexport type FormLabelAlign = 'left' | 'right'\n"]}
@@ -0,0 +1,16 @@
1
+ // @import (reference) '../../style/themes/index';
2
+
3
+ @form-prefix-cls: ~'@{ant-prefix}-form';
4
+ @form-item-prefix-cls: ~'@{form-prefix-cls}-item';
5
+
6
+ // ================================================================
7
+ // = Children Component =
8
+ // ================================================================
9
+ // FIXME: useless, remove in v5
10
+ .@{form-item-prefix-cls} {
11
+ .@{ant-prefix}-input-number {
12
+ + .@{form-prefix-cls}-text {
13
+ margin-left: 8px;
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,26 @@
1
+ // @import (reference) '../../style/themes/index';
2
+
3
+ @form-prefix-cls: ~'@{ant-prefix}-form';
4
+ @form-item-prefix-cls: ~'@{form-prefix-cls}-item';
5
+
6
+
7
+ .@{form-prefix-cls}-tntd {
8
+ &.@{form-prefix-cls}-horizontal {
9
+ .@{form-item-prefix-cls}-label {
10
+ flex-grow: 0;
11
+ }
12
+ .@{form-item-prefix-cls}-control {
13
+ flex: 1 1 0;
14
+ // https://github.com/ant-design/ant-design/issues/32777
15
+ // https://github.com/ant-design/ant-design/issues/33773
16
+ min-width: 0;
17
+ }
18
+ // https://github.com/ant-design/ant-design/issues/32980
19
+ // https://github.com/ant-design/ant-design/issues/34903
20
+ .@{form-item-prefix-cls}-label[class$='-24'] + .@{form-item-prefix-cls}-control,
21
+ .@{form-item-prefix-cls}-label[class*='-24 '] + .@{form-item-prefix-cls}-control {
22
+ min-width: unset;
23
+ }
24
+ }
25
+ }
26
+
@@ -0,0 +1,5 @@
1
+ import '../../style/index.less';
2
+ import './index.less';
3
+ // style dependencies
4
+ import '../../grid/style';
5
+ import '../../tooltip/style';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tntd-form/style/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,cAAc,CAAA;AAErB,qBAAqB;AACrB,OAAO,kBAAkB,CAAA;AACzB,OAAO,qBAAqB,CAAA","sourcesContent":["import '../../style/index.less'\nimport './index.less'\n\n// style dependencies\nimport '../../grid/style'\nimport '../../tooltip/style'\n"]}
@@ -0,0 +1,342 @@
1
+ // @import '../../style/themes/index';
2
+ // @import '../../style/mixins/index';
3
+ // @import './components';
4
+ @import './inline';
5
+ @import './horizontal';
6
+ @import './vertical';
7
+ @import './status';
8
+ @import './mixin';
9
+
10
+ @form-prefix-cls: ~'@{ant-prefix}-form';
11
+ @form-item-prefix-cls: ~'@{form-prefix-cls}-item';
12
+ @form-font-height: ceil(@font-size-base * @line-height-base);
13
+
14
+ @margin-xss: 4px;
15
+
16
+ .@{form-prefix-cls}-tntd {
17
+ &.@{form-prefix-cls} {
18
+ .reset-component();
19
+ .reset-form();
20
+
21
+ .@{form-prefix-cls}-text {
22
+ display: inline-block;
23
+ padding-right: 8px;
24
+ }
25
+
26
+ // ================================================================
27
+ // = Size =
28
+ // ================================================================
29
+ .formSize(@input-height) {
30
+ .@{form-item-prefix-cls}-label > label {
31
+ height: @input-height;
32
+ }
33
+
34
+ .@{form-item-prefix-cls}-control-input {
35
+ min-height: @input-height;
36
+ }
37
+ }
38
+
39
+ &-small {
40
+ .formSize(@input-height-sm);
41
+ }
42
+
43
+ &-large {
44
+ .formSize(@input-height-lg);
45
+ }
46
+ }
47
+
48
+ .explainAndExtraDistance(@num) when (@num >= 0) {
49
+ padding-top: floor(@num);
50
+ }
51
+
52
+ .explainAndExtraDistance(@num) when (@num < 0) {
53
+ margin-top: ceil(@num);
54
+ margin-bottom: ceil(@num);
55
+ }
56
+
57
+ &:not(.@{form-prefix-cls}-vertical) {
58
+ .@{form-item-prefix-cls} {
59
+ &-row {
60
+ display: flex
61
+ }
62
+ }
63
+ }
64
+
65
+ // ================================================================
66
+ // = Item =
67
+ // ================================================================
68
+ .@{form-item-prefix-cls} {
69
+ .reset-component();
70
+
71
+ margin-bottom: @form-item-margin-bottom;
72
+ vertical-align: top;
73
+
74
+ &-with-help {
75
+ transition: none;
76
+ }
77
+
78
+ &-hidden,
79
+ &-hidden.@{ant-prefix}-row {
80
+ // https://github.com/ant-design/ant-design/issues/26141
81
+ display: none;
82
+ }
83
+
84
+ // ==============================================================
85
+ // = Label =
86
+ // ==============================================================
87
+ &-label {
88
+ display: inline-block;
89
+ flex-grow: 0;
90
+ overflow: hidden;
91
+ white-space: nowrap;
92
+ text-align: right;
93
+ vertical-align: middle;
94
+
95
+ &-left {
96
+ text-align: left;
97
+ }
98
+
99
+ &-wrap {
100
+ overflow: unset;
101
+ line-height: (@line-height-base - 0.25em);
102
+ white-space: unset;
103
+ }
104
+
105
+ > label {
106
+ position: relative;
107
+ display: inline-flex;
108
+ align-items: center;
109
+ max-width: 100%;
110
+ height: @form-item-label-height;
111
+ color: @label-color;
112
+ font-size: @form-item-label-font-size;
113
+
114
+ > .@{iconfont-css-prefix} {
115
+ font-size: @form-item-label-font-size;
116
+ vertical-align: top;
117
+ }
118
+
119
+ // Required mark
120
+ &.@{form-item-prefix-cls}-required:not(.@{form-item-prefix-cls}-required-mark-optional)::before {
121
+ display: inline-block;
122
+ margin-right: 4px;
123
+ color: @label-required-color;
124
+ font-size: @form-item-label-font-size;
125
+ font-family: SimSun, sans-serif;
126
+ line-height: 1;
127
+ content: '*';
128
+
129
+ .@{form-prefix-cls}-hide-required-mark & {
130
+ display: none;
131
+ }
132
+ }
133
+
134
+ // Optional mark
135
+ .@{form-item-prefix-cls}-optional {
136
+ display: inline-block;
137
+ margin-left: @margin-xss;
138
+ color: @text-color-secondary;
139
+
140
+ .@{form-prefix-cls}-hide-required-mark & {
141
+ display: none;
142
+ }
143
+ }
144
+
145
+ // Optional mark
146
+ .@{form-item-prefix-cls}-tooltip {
147
+ color: @text-color-secondary;
148
+ cursor: help;
149
+ writing-mode: horizontal-tb;
150
+ margin-inline-start: @margin-xss;
151
+ }
152
+
153
+ &::after {
154
+ & when (@form-item-trailing-colon=true) {
155
+ content: ':';
156
+ }
157
+ & when not (@form-item-trailing-colon=true) {
158
+ content: ' ';
159
+ }
160
+
161
+ position: relative;
162
+ top: -0.5px;
163
+ margin: 0 @form-item-label-colon-margin-right 0 @form-item-label-colon-margin-left;
164
+ }
165
+
166
+ &.@{form-item-prefix-cls}-no-colon::after {
167
+ content: ' ';
168
+ }
169
+ }
170
+ }
171
+
172
+ // ==============================================================
173
+ // = Input =
174
+ // ==============================================================
175
+ &-control {
176
+ display: flex;
177
+ flex-direction: column;
178
+ flex-grow: 1;
179
+
180
+ &:first-child:not([class^=~"'@{ant-prefix}-col-'"]):not([class*=~"' @{ant-prefix}-col-'"]) {
181
+ width: 100%;
182
+ }
183
+ }
184
+
185
+ &-control-input {
186
+ position: relative;
187
+ display: flex;
188
+ align-items: center;
189
+ min-height: @input-height-base;
190
+
191
+ &-content {
192
+ flex: auto;
193
+ max-width: 100%;
194
+ }
195
+ }
196
+
197
+ // ==============================================================
198
+ // = Explain =
199
+ // ==============================================================
200
+ &-explain,
201
+ &-extra {
202
+ clear: both;
203
+ color: @text-color-secondary;
204
+ font-size: @font-size-base;
205
+ line-height: @line-height-base;
206
+ transition: color 0.3s @ease-out; // sync input color transition
207
+ // .explainAndExtraDistance((@form-item-margin-bottom - @form-font-height) / 2);
208
+ }
209
+
210
+ &-explain-connected {
211
+ width: 100%;
212
+ }
213
+
214
+ &-extra {
215
+ min-height: @form-item-margin-bottom;
216
+ }
217
+
218
+ &-with-help &-explain {
219
+ height: auto;
220
+ // min-height: @form-item-margin-bottom;
221
+ opacity: 1;
222
+ }
223
+
224
+ // ==============================================================
225
+ // = Feedback Icon =
226
+ // ==============================================================
227
+ &-feedback-icon {
228
+ font-size: @font-size-base;
229
+ text-align: center;
230
+ visibility: visible;
231
+ animation: zoomIn 0.3s @ease-out-back;
232
+ pointer-events: none;
233
+
234
+ &-success {
235
+ color: @success-color;
236
+ }
237
+
238
+ &-error {
239
+ color: @error-color;
240
+ }
241
+
242
+ &-warning {
243
+ color: @warning-color;
244
+ }
245
+
246
+ &-validating {
247
+ color: @primary-color;
248
+ }
249
+ }
250
+ }
251
+
252
+ // >>>>>>>>>> Motion <<<<<<<<<<
253
+ // Explain holder
254
+ .@{ant-prefix}-show-help {
255
+ transition: opacity @animation-duration-slow @ease-in-out;
256
+
257
+ &-appear,
258
+ &-enter {
259
+ opacity: 0;
260
+
261
+ &-active {
262
+ opacity: 1;
263
+ }
264
+ }
265
+
266
+ &-leave {
267
+ opacity: 1;
268
+
269
+ &-active {
270
+ opacity: 0;
271
+ }
272
+ }
273
+ }
274
+
275
+ // Explain
276
+ .@{ant-prefix}-show-help-item {
277
+ overflow: hidden;
278
+ transition: height @animation-duration-slow @ease-in-out,
279
+ opacity @animation-duration-slow @ease-in-out, transform @animation-duration-slow @ease-in-out !important;
280
+
281
+ &-appear,
282
+ &-enter {
283
+ transform: translateY(-5px);
284
+ opacity: 0;
285
+
286
+ &-active {
287
+ transform: translateY(0);
288
+ opacity: 1;
289
+ }
290
+ }
291
+
292
+ &-leave {
293
+ transition: height @animation-duration-base @ease-in-out,
294
+ opacity @animation-duration-base @ease-in-out, transform @animation-duration-base @ease-in-out !important;
295
+ }
296
+
297
+ &-leave-active {
298
+ transform: translateY(-5px);
299
+ }
300
+ }
301
+
302
+ // need there different zoom animation
303
+ // otherwise won't trigger anim
304
+ @keyframes diffZoomIn1 {
305
+ 0% {
306
+ transform: scale(0);
307
+ opacity: 0;
308
+ }
309
+
310
+ 100% {
311
+ transform: scale(1);
312
+ opacity: 1;
313
+ }
314
+ }
315
+
316
+ @keyframes diffZoomIn2 {
317
+ 0% {
318
+ transform: scale(0);
319
+ opacity: 0;
320
+ }
321
+
322
+ 100% {
323
+ transform: scale(1);
324
+ opacity: 1;
325
+ }
326
+ }
327
+
328
+ @keyframes diffZoomIn3 {
329
+ 0% {
330
+ transform: scale(0);
331
+ opacity: 0;
332
+ }
333
+
334
+ 100% {
335
+ transform: scale(1);
336
+ opacity: 1;
337
+ }
338
+ }
339
+ }
340
+
341
+
342
+ @import './rtl';
@@ -0,0 +1,40 @@
1
+ // @import (reference) '../../style/themes/index';
2
+
3
+ @form-prefix-cls: ~'@{ant-prefix}-form';
4
+ @form-item-prefix-cls: ~'@{form-prefix-cls}-item';
5
+
6
+ .@{form-prefix-cls}-tntd {
7
+ &.@{form-prefix-cls}-inline {
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+
11
+ .@{form-prefix-cls}-item {
12
+ flex: none;
13
+ flex-wrap: nowrap;
14
+ margin-right: 16px;
15
+ margin-bottom: 0;
16
+
17
+ &-with-help {
18
+ margin-bottom: @form-item-margin-bottom;
19
+ }
20
+
21
+ > .@{form-item-prefix-cls}-label,
22
+ > .@{form-item-prefix-cls}-control {
23
+ display: inline-block;
24
+ vertical-align: top;
25
+ }
26
+
27
+ > .@{form-item-prefix-cls}-label {
28
+ flex: none;
29
+ }
30
+
31
+ .@{form-prefix-cls}-text {
32
+ display: inline-block;
33
+ }
34
+
35
+ .@{form-item-prefix-cls}-has-feedback {
36
+ display: inline-block;
37
+ }
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,90 @@
1
+ // @import '../../input/style/mixin';
2
+
3
+ .form-control-validation(
4
+ @text-color: @input-color;
5
+ @border-color: @input-border-color;
6
+ @background-color: @input-bg;
7
+ @hoverBorderColor: @primary-color-hover;
8
+ @outlineColor: @primary-color-outline;
9
+ ) {
10
+ .@{ant-prefix}-form-item-split {
11
+ color: @text-color;
12
+ }
13
+ }
14
+
15
+ // Reset form styles
16
+ // -----------------------------
17
+ // Based on Bootstrap framework
18
+ .reset-form() {
19
+ legend {
20
+ display: block;
21
+ width: 100%;
22
+ margin-bottom: 20px;
23
+ padding: 0;
24
+ color: @text-color-secondary;
25
+ font-size: @font-size-lg;
26
+ line-height: inherit;
27
+ border: 0;
28
+ border-bottom: @border-width-base @border-style-base @border-color-base;
29
+ }
30
+
31
+ label {
32
+ font-size: @font-size-base;
33
+ }
34
+
35
+ input[type='search'] {
36
+ box-sizing: border-box;
37
+ }
38
+
39
+ // Position radios and checkboxes better
40
+ input[type='radio'],
41
+ input[type='checkbox'] {
42
+ line-height: normal;
43
+ }
44
+
45
+ input[type='file'] {
46
+ display: block;
47
+ }
48
+
49
+ // Make range inputs behave like textual form controls
50
+ input[type='range'] {
51
+ display: block;
52
+ width: 100%;
53
+ }
54
+
55
+ // Make multiple select elements height not fixed
56
+ select[multiple],
57
+ select[size] {
58
+ height: auto;
59
+ }
60
+
61
+ // Focus for file, radio, and checkbox
62
+ input[type='file']:focus,
63
+ input[type='radio']:focus,
64
+ input[type='checkbox']:focus {
65
+ outline: thin dotted;
66
+ outline: 5px auto -webkit-focus-ring-color;
67
+ outline-offset: -2px;
68
+ }
69
+
70
+ // Adjust output element
71
+ output {
72
+ display: block;
73
+ padding-top: 15px;
74
+ color: @input-color;
75
+ font-size: @font-size-base;
76
+ line-height: @line-height-base;
77
+ }
78
+ }
79
+
80
+ .reset-component() {
81
+ box-sizing: border-box;
82
+ margin: 0;
83
+ padding: 0;
84
+ color: @text-color;
85
+ font-size: @font-size-base;
86
+ font-variant: @font-variant-base;
87
+ line-height: @line-height-base;
88
+ list-style: none;
89
+ font-feature-settings: @font-feature-settings-base;
90
+ }