tntd 2.7.29-beta.1 → 2.7.30

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 (1558) hide show
  1. package/es/_util/context.js +5 -7
  2. package/es/_util/defaultRenderEmpty.js +21 -10
  3. package/es/_util/hooks/useFlexGapSupport.js +7 -8
  4. package/es/_util/hooks/useForceUpdate.js +3 -4
  5. package/es/_util/motion.js +36 -27
  6. package/es/_util/reactNode.js +10 -9
  7. package/es/_util/responsiveObserve.js +51 -50
  8. package/es/_util/styleChecker.js +19 -20
  9. package/es/_util/type.js +1 -2
  10. package/es/_util/warning.js +3 -4
  11. package/es/actions/index.js +22 -8
  12. package/es/affix/index.js +1 -2
  13. package/es/affix/style/index.js +2 -0
  14. package/es/affix/style/index.js.map +1 -0
  15. package/es/affix/style/index.less +6 -0
  16. package/es/alert/index.js +1 -2
  17. package/es/alert/style/index.js +2 -0
  18. package/es/alert/style/index.js.map +1 -0
  19. package/es/alert/style/index.less +188 -0
  20. package/es/anchor/index.js +1 -2
  21. package/es/anchor/style/index.js +4 -0
  22. package/es/anchor/style/index.js.map +1 -0
  23. package/es/anchor/style/index.less +82 -0
  24. package/es/array-input/icon.js +24 -6
  25. package/es/array-input/index.js +203 -119
  26. package/es/auth-context/index.js +1 -2
  27. package/es/auto-complete/index.js +1 -2
  28. package/es/auto-complete/style/index.js +5 -0
  29. package/es/auto-complete/style/index.js.map +1 -0
  30. package/es/auto-complete/style/index.less +92 -0
  31. package/es/avatar/index.js +1 -2
  32. package/es/avatar/style/index.js +2 -0
  33. package/es/avatar/style/index.js.map +1 -0
  34. package/es/avatar/style/index.less +59 -0
  35. package/es/back-top/index.js +1 -2
  36. package/es/back-top/style/index.js +2 -0
  37. package/es/back-top/style/index.js.map +1 -0
  38. package/es/back-top/style/index.less +42 -0
  39. package/es/back-top/style/responsive.less +11 -0
  40. package/es/badge/index.js +1 -2
  41. package/es/badge/style/index.js +2 -0
  42. package/es/badge/style/index.js.map +1 -0
  43. package/es/badge/style/index.less +190 -0
  44. package/es/breadcrumb/index.js +1 -2
  45. package/es/breadcrumb/style/index.js +4 -0
  46. package/es/breadcrumb/style/index.js.map +1 -0
  47. package/es/breadcrumb/style/index.less +51 -0
  48. package/es/button/button.js +28 -23
  49. package/es/button/index.js +1 -2
  50. package/es/button/style/index.js +2 -0
  51. package/es/button/style/index.js.map +1 -0
  52. package/es/button/style/index.less +224 -0
  53. package/es/button/style/mixin.less +357 -0
  54. package/es/calendar/index.js +1 -2
  55. package/es/calendar/style/index.js +5 -0
  56. package/es/calendar/style/index.js.map +1 -0
  57. package/es/calendar/style/index.less +278 -0
  58. package/es/card/card.js +19 -15
  59. package/es/card/index.js +1 -2
  60. package/es/card/style/index.js +6 -0
  61. package/es/card/style/index.js.map +1 -0
  62. package/es/card/style/index.less +263 -0
  63. package/es/card/style/size.less +25 -0
  64. package/es/carousel/index.js +1 -2
  65. package/es/carousel/style/index.js +2 -0
  66. package/es/carousel/style/index.js.map +1 -0
  67. package/es/carousel/style/index.less +238 -0
  68. package/es/cascader/index.js +1 -2
  69. package/es/cascader/style/index.js +5 -0
  70. package/es/cascader/style/index.js.map +1 -0
  71. package/es/cascader/style/index.less +227 -0
  72. package/es/check-card/group.js +186 -138
  73. package/es/check-card/index.js +150 -107
  74. package/es/checkbox/checkbox-group.js +1 -2
  75. package/es/checkbox/index.js +1 -2
  76. package/es/checkbox/style/index.js +2 -0
  77. package/es/checkbox/style/index.js.map +1 -0
  78. package/es/checkbox/style/index.less +4 -0
  79. package/es/checkbox/style/mixin.less +220 -0
  80. package/es/col/index.js +1 -2
  81. package/es/col/style/index.js +4 -0
  82. package/es/col/style/index.js.map +1 -0
  83. package/es/collapse/index.js +1 -2
  84. package/es/collapse/style/index.js +2 -0
  85. package/es/collapse/style/index.js.map +1 -0
  86. package/es/collapse/style/index.less +134 -0
  87. package/es/color-picker/ColorPicker.js +126 -80
  88. package/es/color-picker/index.js +8 -5
  89. package/es/columns/index.js +66 -30
  90. package/es/columns/style/index.js +1 -2
  91. package/es/comment/index.js +1 -2
  92. package/es/comment/style/index.js +2 -0
  93. package/es/comment/style/index.js.map +1 -0
  94. package/es/comment/style/index.less +93 -0
  95. package/es/config-provider/DisabledContext.js +9 -5
  96. package/es/config-provider/SizeContext.js +7 -3
  97. package/es/config-provider/config-provider.js +1 -2
  98. package/es/config-provider/index.js +1 -2
  99. package/es/config-provider/style/index.js +1 -0
  100. package/es/config-provider/style/index.js.map +1 -0
  101. package/es/config-provider/style/index.less +2 -0
  102. package/es/connect/index.js +23 -20
  103. package/es/date-picker/index.js +9 -6
  104. package/es/date-picker/style/Calendar.less +402 -0
  105. package/es/date-picker/style/DecadePanel.less +81 -0
  106. package/es/date-picker/style/MonthPanel.less +86 -0
  107. package/es/date-picker/style/MonthPicker.less +11 -0
  108. package/es/date-picker/style/Picker.less +113 -0
  109. package/es/date-picker/style/RangePicker.less +248 -0
  110. package/es/date-picker/style/TimePicker.less +151 -0
  111. package/es/date-picker/style/WeekPicker.less +21 -0
  112. package/es/date-picker/style/YearPanel.less +85 -0
  113. package/es/date-picker/style/index.js +7 -0
  114. package/es/date-picker/style/index.js.map +1 -0
  115. package/es/date-picker/style/index.less +17 -0
  116. package/es/descriptions/descriptions.js +38 -30
  117. package/es/descriptions/index.js +1 -2
  118. package/es/descriptions/style/index.js +2 -0
  119. package/es/descriptions/style/index.js.map +1 -0
  120. package/es/descriptions/style/index.less +144 -0
  121. package/es/development-login/LoginModal.js +81 -46
  122. package/es/development-login/index.js +17 -8
  123. package/es/divider/index.js +1 -2
  124. package/es/divider/style/index.js +2 -0
  125. package/es/divider/style/index.js.map +1 -0
  126. package/es/divider/style/index.less +109 -0
  127. package/es/drawer/drawer.js +27 -20
  128. package/es/drawer/index.js +1 -2
  129. package/es/drawer/style/drawer.less +230 -0
  130. package/es/drawer/style/index.js +3 -0
  131. package/es/drawer/style/index.js.map +1 -0
  132. package/es/drawer/style/index.less +3 -0
  133. package/es/dropdown/index.js +1 -2
  134. package/es/dropdown/style/index.js +4 -0
  135. package/es/dropdown/style/index.js.map +1 -0
  136. package/es/dropdown/style/index.less +282 -0
  137. package/es/ellipsis/Svg/CopySVG.js +63 -16
  138. package/es/ellipsis/Svg/TickSVG.js +41 -11
  139. package/es/ellipsis/index.js +137 -99
  140. package/es/empty/empty.js +58 -48
  141. package/es/empty/empty.stories.js +5 -6
  142. package/es/empty/index.js +1 -2
  143. package/es/empty/style/index.js +2 -0
  144. package/es/empty/style/index.js.map +1 -0
  145. package/es/empty/style/index.less +52 -0
  146. package/es/exception/exception.js +32 -19
  147. package/es/exception/index.js +1 -2
  148. package/es/form/form.js +63 -55
  149. package/es/form/index.js +1 -2
  150. package/es/form/style/index.js +4 -0
  151. package/es/form/style/index.js.map +1 -0
  152. package/es/form/style/index.less +653 -0
  153. package/es/form/style/mixin.less +126 -0
  154. package/es/grid/RowContext.js +1 -2
  155. package/es/grid/col.js +89 -64
  156. package/es/grid/hooks/useBreakpoint.js +13 -14
  157. package/es/grid/index.js +4 -3
  158. package/es/grid/row.js +136 -123
  159. package/es/grid/style/index.js +1 -2
  160. package/es/grid-v4/RowContext.js +3 -0
  161. package/es/grid-v4/RowContext.js.map +1 -0
  162. package/es/grid-v4/col.js +103 -0
  163. package/es/grid-v4/col.js.map +1 -0
  164. package/es/grid-v4/hooks/useBreakpoint.js +18 -0
  165. package/es/grid-v4/hooks/useBreakpoint.js.map +1 -0
  166. package/es/grid-v4/index.js +14 -0
  167. package/es/grid-v4/index.js.map +1 -0
  168. package/es/grid-v4/row.js +154 -0
  169. package/es/grid-v4/row.js.map +1 -0
  170. package/es/grid-v4/style/index.js +2 -0
  171. package/es/grid-v4/style/index.js.map +1 -0
  172. package/es/grid-v4/style/index.less +124 -0
  173. package/es/grid-v4/style/mixin.less +57 -0
  174. package/es/grid-v4/style/rtl.less +69 -0
  175. package/es/handle/handle.js +128 -92
  176. package/es/handle/index.js +131 -91
  177. package/es/icon/index.js +1 -2
  178. package/es/icon/style/index.js +2 -0
  179. package/es/icon/style/index.js.map +1 -0
  180. package/es/icon/style/index.less +4 -0
  181. package/es/icon-list/index.js +1 -120
  182. package/es/img/Contain.js +60 -39
  183. package/es/img/Cover.js +98 -72
  184. package/es/img/index.js +48 -32
  185. package/es/index.js +1 -2
  186. package/es/input/index.js +1 -2
  187. package/es/input/input.js +93 -46
  188. package/es/input/style/index.js +4 -0
  189. package/es/input/style/index.js.map +1 -0
  190. package/es/input/style/index.less +57 -0
  191. package/es/input/style/mixin.less +449 -0
  192. package/es/input/style/search-input.less +34 -0
  193. package/es/input-number/index.js +1 -2
  194. package/es/input-number/style/index.js +2 -0
  195. package/es/input-number/style/index.js.map +1 -0
  196. package/es/input-number/style/index.less +179 -0
  197. package/es/label/index.js +115 -98
  198. package/es/layout/index.js +1 -2
  199. package/es/layout/style/index.js +2 -0
  200. package/es/layout/style/index.js.map +1 -0
  201. package/es/layout/style/index.less +124 -0
  202. package/es/layout/style/light.less +15 -0
  203. package/es/list/index.js +1 -2
  204. package/es/list/style/bordered.less +41 -0
  205. package/es/list/style/index.js +7 -0
  206. package/es/list/style/index.js.map +1 -0
  207. package/es/list/style/index.less +234 -0
  208. package/es/list/style/responsive.less +40 -0
  209. package/es/loading-button/index.js +33 -28
  210. package/es/locale/default.js +3 -4
  211. package/es/locale/en_US.js +41 -42
  212. package/es/locale/index.js +1 -2
  213. package/es/locale/zh_CN.js +34 -35
  214. package/es/locale-provider/index.js +2 -3
  215. package/es/locale-provider/style/index.js +1 -0
  216. package/es/locale-provider/style/index.js.map +1 -0
  217. package/es/locale-provider/style/index.less +2 -0
  218. package/es/mentions/index.js +1 -2
  219. package/es/mentions/style/index.js +4 -0
  220. package/es/mentions/style/index.js.map +1 -0
  221. package/es/mentions/style/index.less +164 -0
  222. package/es/menu/index.js +1 -2
  223. package/es/menu/style/dark.less +139 -0
  224. package/es/menu/style/index.js +5 -0
  225. package/es/menu/style/index.js.map +1 -0
  226. package/es/menu/style/index.less +515 -0
  227. package/es/message/index.js +1 -2
  228. package/es/message/style/index.js +2 -0
  229. package/es/message/style/index.js.map +1 -0
  230. package/es/message/style/index.less +75 -0
  231. package/es/modal/index.js +1 -2
  232. package/es/modal/modal.js +24 -15
  233. package/es/modal/style/confirm.less +78 -0
  234. package/es/modal/style/index.js +4 -0
  235. package/es/modal/style/index.js.map +1 -0
  236. package/es/modal/style/index.less +4 -0
  237. package/es/modal/style/modal.less +165 -0
  238. package/es/notification/index.js +1 -2
  239. package/es/notification/style/index.js +2 -0
  240. package/es/notification/style/index.js.map +1 -0
  241. package/es/notification/style/index.less +199 -0
  242. package/es/page/Box.js +49 -33
  243. package/es/page/index.js +120 -84
  244. package/es/page/utils.js +12 -14
  245. package/es/page-header/index.js +1 -2
  246. package/es/page-header/style/index.js +4 -0
  247. package/es/page-header/style/index.js.map +1 -0
  248. package/es/page-header/style/index.less +119 -0
  249. package/es/pagination/index.js +1 -2
  250. package/es/pagination/style/index.js +4 -0
  251. package/es/pagination/style/index.js.map +1 -0
  252. package/es/pagination/style/index.less +400 -0
  253. package/es/popconfirm/index.js +1 -2
  254. package/es/popconfirm/style/index.js +5 -0
  255. package/es/popconfirm/style/index.js.map +1 -0
  256. package/es/popover/index.js +1 -2
  257. package/es/popover/style/index.js +4 -0
  258. package/es/popover/style/index.js.map +1 -0
  259. package/es/popover/style/index.less +205 -0
  260. package/es/prev-locale.js +49 -47
  261. package/es/preview-text/index.js +247 -177
  262. package/es/progress/index.js +1 -2
  263. package/es/progress/style/index.js +2 -0
  264. package/es/progress/style/index.js.map +1 -0
  265. package/es/progress/style/index.less +182 -0
  266. package/es/query-form/Field/Checkbox.js +20 -17
  267. package/es/query-form/Field/Select.js +54 -39
  268. package/es/query-form/Field/SelectInput.js +65 -45
  269. package/es/query-form/Field/fieldsMap.js +19 -20
  270. package/es/query-form/Field/index.js +108 -67
  271. package/es/query-form/createActions.js +46 -46
  272. package/es/query-form/index.js +327 -247
  273. package/es/query-form/useForm.js +3 -4
  274. package/es/query-list-scene/List.js +321 -255
  275. package/es/query-list-scene/QueryForm.js +132 -94
  276. package/es/query-list-scene/QueryListScene.js +29 -21
  277. package/es/query-list-scene/Title.js +6 -4
  278. package/es/query-list-scene/Toolbar.js +21 -15
  279. package/es/query-list-scene/createActions.js +60 -60
  280. package/es/query-list-scene/index.js +1 -2
  281. package/es/query-list-scene/useActions.js +3 -4
  282. package/es/radio/index.js +1 -2
  283. package/es/radio/radio-group.js +1 -2
  284. package/es/radio/style/index.js +2 -0
  285. package/es/radio/style/index.js.map +1 -0
  286. package/es/radio/style/index.less +327 -0
  287. package/es/rate/index.js +1 -2
  288. package/es/rate/style/index.js +4 -0
  289. package/es/rate/style/index.js.map +1 -0
  290. package/es/rate/style/index.less +85 -0
  291. package/es/render-empty/index.js +1 -2
  292. package/es/render-empty/render-empty.js +19 -16
  293. package/es/result/index.js +1 -2
  294. package/es/result/style/index.js +2 -0
  295. package/es/result/style/index.js.map +1 -0
  296. package/es/result/style/index.less +71 -0
  297. package/es/row/index.js +1 -2
  298. package/es/row/style/index.js +4 -0
  299. package/es/row/style/index.js.map +1 -0
  300. package/es/segmented/index.js +55 -38
  301. package/es/select/index.js +1 -2
  302. package/es/select/select.js +43 -27
  303. package/es/select/style/index.js +4 -0
  304. package/es/select/style/index.js.map +1 -0
  305. package/es/select/style/index.less +604 -0
  306. package/es/skeleton/index.js +1 -2
  307. package/es/skeleton/style/index.js +2 -0
  308. package/es/skeleton/style/index.js.map +1 -0
  309. package/es/skeleton/style/index.less +130 -0
  310. package/es/slider/index.js +1 -2
  311. package/es/slider/style/index.js +4 -0
  312. package/es/slider/style/index.js.map +1 -0
  313. package/es/slider/style/index.less +197 -0
  314. package/es/spin/index.js +1 -2
  315. package/es/spin/style/index.js +2 -0
  316. package/es/spin/style/index.js.map +1 -0
  317. package/es/spin/style/index.less +214 -0
  318. package/es/statistic/index.js +1 -2
  319. package/es/statistic/style/index.js +2 -0
  320. package/es/statistic/style/index.js.map +1 -0
  321. package/es/statistic/style/index.less +40 -0
  322. package/es/steps/index.js +1 -2
  323. package/es/steps/steps.js +51 -35
  324. package/es/steps/style/compatibility.less +50 -0
  325. package/es/steps/style/custom-icon.less +31 -0
  326. package/es/steps/style/index.js +2 -0
  327. package/es/steps/style/index.js.map +1 -0
  328. package/es/steps/style/label-placement.less +38 -0
  329. package/es/steps/style/progress-dot.less +80 -0
  330. package/es/steps/style/vertical.less +74 -0
  331. package/es/style/color/bezierEasing.less +110 -0
  332. package/es/style/color/colorPalette.less +75 -0
  333. package/es/style/color/colors.less +149 -0
  334. package/es/style/color/tinyColor.less +1184 -0
  335. package/es/style/core/base.less +510 -0
  336. package/es/style/core/iconfont.less +19 -0
  337. package/es/style/core/index.less +4 -0
  338. package/es/style/core/motion/fade.less +31 -0
  339. package/es/style/core/motion/move.less +120 -0
  340. package/es/style/core/motion/other.less +40 -0
  341. package/es/style/core/motion/slide.less +120 -0
  342. package/es/style/core/motion/swing.less +34 -0
  343. package/es/style/core/motion/zoom.less +162 -0
  344. package/es/style/core/motion.less +20 -0
  345. package/es/style/index.js +1 -0
  346. package/es/style/index.js.map +1 -0
  347. package/es/style/index.less +2 -0
  348. package/es/style/mixins/clearfix.less +13 -0
  349. package/es/style/mixins/compatibility.less +22 -0
  350. package/es/style/mixins/iconfont.less +43 -0
  351. package/es/style/mixins/index.less +10 -0
  352. package/es/style/mixins/motion.less +35 -0
  353. package/es/style/mixins/operation-unit.less +18 -0
  354. package/es/style/mixins/reset.less +13 -0
  355. package/es/style/mixins/size.less +10 -0
  356. package/es/style/mixins/typography.less +49 -0
  357. package/es/style/themes/default.less +699 -0
  358. package/es/style/themes/index.less +1 -0
  359. package/es/style/v2-compatible-reset.js +1 -0
  360. package/es/style/v2-compatible-reset.js.map +1 -0
  361. package/es/style/v2-compatible-reset.less +51 -0
  362. package/es/svg-components/illustration-403.js +206 -58
  363. package/es/svg-components/illustration-404.js +290 -75
  364. package/es/svg-components/illustration-500.js +321 -83
  365. package/es/svg-components/illustration-empty.js +54 -15
  366. package/es/svg-components/illustration-failure.js +112 -36
  367. package/es/svg-components/illustration-no-access.js +114 -35
  368. package/es/svg-components/illustration-no-chart.js +134 -37
  369. package/es/svg-components/illustration-no-result.js +92 -32
  370. package/es/svg-components/illustration-offline.js +131 -43
  371. package/es/svg-components/illustration-success.js +137 -43
  372. package/es/svg-components/index.js +1 -2
  373. package/es/switch/index.js +1 -2
  374. package/es/switch/style/index.js +2 -0
  375. package/es/switch/style/index.js.map +1 -0
  376. package/es/switch/style/index.less +178 -0
  377. package/es/switch/switch.js +4 -3
  378. package/es/table/assets/image-loading-background.js +45 -17
  379. package/es/table/assets/image-loading.js +26 -5
  380. package/es/table/constants.js +1 -2
  381. package/es/table/context.js +1 -2
  382. package/es/table/hooks/index.js +1 -2
  383. package/es/table/hooks/use-column-setting.js +13 -16
  384. package/es/table/index.js +1 -2
  385. package/es/table/style/index.js +10 -0
  386. package/es/table/style/index.js.map +1 -0
  387. package/es/table/style/index.less +800 -0
  388. package/es/table/style/size.less +179 -0
  389. package/es/table/table.js +162 -129
  390. package/es/table/table.stories.js +148 -139
  391. package/es/table/total-shower.js +8 -4
  392. package/es/table/utils.js +17 -18
  393. package/es/tabs/index.js +1 -2
  394. package/es/tabs/style/card-style.less +186 -0
  395. package/es/tabs/style/index.js +2 -0
  396. package/es/tabs/style/index.js.map +1 -0
  397. package/es/tabs/style/index.less +436 -0
  398. package/es/tabs/tabPane.js +1 -2
  399. package/es/tabs/tabs.js +38 -27
  400. package/es/tabs/tabs.js.map +1 -1
  401. package/es/tag/index.js +1 -2
  402. package/es/tag/style/index.js +2 -0
  403. package/es/tag/style/index.js.map +1 -0
  404. package/es/tag/style/index.less +106 -0
  405. package/es/time-picker/index.js +1 -2
  406. package/es/time-picker/style/index.js +2 -0
  407. package/es/time-picker/style/index.js.map +1 -0
  408. package/es/time-picker/style/index.less +246 -0
  409. package/es/timeline/index.js +1 -2
  410. package/es/timeline/style/index.js +2 -0
  411. package/es/timeline/style/index.js.map +1 -0
  412. package/es/timeline/style/index.less +167 -0
  413. package/es/title/index.js +32 -20
  414. package/es/tntd-cascader/AntdCascader/component/DisabledContext.js +9 -5
  415. package/es/tntd-cascader/AntdCascader/component/FormItemInputContext.js +1 -2
  416. package/es/tntd-cascader/AntdCascader/component/SizeContext.js +1 -2
  417. package/es/tntd-cascader/AntdCascader/component/context.js +5 -7
  418. package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +22 -10
  419. package/es/tntd-cascader/AntdCascader/component/getIcons.js +72 -50
  420. package/es/tntd-cascader/AntdCascader/component/useCompactItemContext.js +22 -20
  421. package/es/tntd-cascader/AntdCascader/config/utils.js +17 -18
  422. package/es/tntd-cascader/AntdCascader/config/warning.js +9 -10
  423. package/es/tntd-cascader/AntdCascader/index.js +189 -118
  424. package/es/tntd-cascader/AntdCascader/interface.js +1 -2
  425. package/es/tntd-cascader/index.js +1 -2
  426. package/es/tntd-cascader/rc-cascader/Cascader.js +256 -239
  427. package/es/tntd-cascader/rc-cascader/OptionList/Checkbox.js +21 -11
  428. package/es/tntd-cascader/rc-cascader/OptionList/Column.js +175 -116
  429. package/es/tntd-cascader/rc-cascader/OptionList/index.js +180 -128
  430. package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +22 -19
  431. package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +144 -137
  432. package/es/tntd-cascader/rc-cascader/context.js +1 -2
  433. package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +44 -37
  434. package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +25 -24
  435. package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +15 -17
  436. package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +7 -8
  437. package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +20 -21
  438. package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +51 -41
  439. package/es/tntd-cascader/rc-cascader/index.js +1 -2
  440. package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +33 -27
  441. package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +29 -32
  442. package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +26 -23
  443. package/es/tntd-form/ErrorList.js +75 -41
  444. package/es/tntd-form/Form.js +118 -97
  445. package/es/tntd-form/FormItem/ItemHolder.js +126 -117
  446. package/es/tntd-form/FormItem/index.js +232 -206
  447. package/es/tntd-form/FormItemInput.js +72 -31
  448. package/es/tntd-form/FormItemLabel.js +87 -62
  449. package/es/tntd-form/FormList.js +33 -27
  450. package/es/tntd-form/_util/motion.js +36 -27
  451. package/es/tntd-form/_util/reactNode.js +10 -9
  452. package/es/tntd-form/_util/scrollTo.js +2 -2
  453. package/es/tntd-form/_util/type.js +1 -2
  454. package/es/tntd-form/_util/warning.js +3 -4
  455. package/es/tntd-form/_util/wave.js +2 -2
  456. package/es/tntd-form/context.js +29 -24
  457. package/es/tntd-form/hooks/useDebounce.js +11 -12
  458. package/es/tntd-form/hooks/useForm.js +33 -28
  459. package/es/tntd-form/hooks/useFormInstance.js +5 -4
  460. package/es/tntd-form/hooks/useFormItemStatus.js +8 -5
  461. package/es/tntd-form/hooks/useFrameState.js +32 -33
  462. package/es/tntd-form/hooks/useItemRef.js +15 -14
  463. package/es/tntd-form/index.js +1 -2
  464. package/es/tntd-form/interface.js +1 -2
  465. package/es/tntd-form/style/index.js +1 -2
  466. package/es/tntd-form/tntd-form.stories.js +781 -383
  467. package/es/tntd-form/util.js +10 -13
  468. package/es/tntd-form/validateMessagesContext.js +1 -2
  469. package/es/tntd-icon/fonts/iconfont.js +36 -53
  470. package/es/tntd-icon/index.js +23 -17
  471. package/es/tntd-layout/ActionsContext.js +1 -2
  472. package/es/tntd-layout/AppList.js +135 -77
  473. package/es/tntd-layout/Application.js +42 -29
  474. package/es/tntd-layout/Avatar.js +80 -42
  475. package/es/tntd-layout/CompatibleLanguage.js +93 -56
  476. package/es/tntd-layout/EnterpriseLayout/Avatar.js +93 -47
  477. package/es/tntd-layout/EnterpriseLayout/Language.js +56 -34
  478. package/es/tntd-layout/EnterpriseLayout/Theme.js +45 -24
  479. package/es/tntd-layout/EnterpriseLayout/index.js +17 -9
  480. package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +212 -153
  481. package/es/tntd-layout/GlobalNavigation/index.js +84 -50
  482. package/es/tntd-layout/Header.js +59 -26
  483. package/es/tntd-layout/HeaderActions.js +84 -34
  484. package/es/tntd-layout/HeaderNavs.js +46 -35
  485. package/es/tntd-layout/HeaderTabs.js +176 -140
  486. package/es/tntd-layout/Iconfont.js +1 -2
  487. package/es/tntd-layout/Language.js +55 -33
  488. package/es/tntd-layout/Layout.js +176 -78
  489. package/es/tntd-layout/Logo.js +52 -40
  490. package/es/tntd-layout/OrgAppList.js +208 -139
  491. package/es/tntd-layout/SideMenu.js +230 -160
  492. package/es/tntd-layout/Theme.js +47 -29
  493. package/es/tntd-layout/createActions.js +28 -29
  494. package/es/tntd-layout/images/index.js +31 -32
  495. package/es/tntd-layout/index.js +92 -60
  496. package/es/tntd-layout/paaslayout/CompactSideMenu.js +109 -65
  497. package/es/tntd-layout/paaslayout/Header.js +37 -14
  498. package/es/tntd-layout/paaslayout/Logo.js +2 -3
  499. package/es/tntd-layout/paaslayout/SideMenu.js +109 -63
  500. package/es/tntd-layout/paaslayout/index.js +159 -79
  501. package/es/tntd-layout/storage.js +18 -11
  502. package/es/tntd-modal/index.js +73 -32
  503. package/es/tntd-rc-select/_util/DisabledContext.js +9 -5
  504. package/es/tntd-rc-select/_util/FormItemInputContext.js +1 -2
  505. package/es/tntd-rc-select/_util/PurePanel.js +59 -48
  506. package/es/tntd-rc-select/_util/SizeContext.js +1 -2
  507. package/es/tntd-rc-select/_util/context.js +5 -7
  508. package/es/tntd-rc-select/_util/defaultRenderEmpty.js +21 -10
  509. package/es/tntd-rc-select/_util/getIcons.js +72 -50
  510. package/es/tntd-rc-select/_util/interface.js +1 -2
  511. package/es/tntd-rc-select/_util/motion.js +36 -27
  512. package/es/tntd-rc-select/_util/type.js +1 -2
  513. package/es/tntd-rc-select/_util/useCompactItemContext.js +22 -20
  514. package/es/tntd-rc-select/_util/warning.js +9 -10
  515. package/es/tntd-rc-select/index.js +131 -76
  516. package/es/tntd-second-page/index.js +47 -24
  517. package/es/tntd-select/DropDownWrap.js +73 -52
  518. package/es/tntd-select/_util/DisabledContext.js +9 -5
  519. package/es/tntd-select/_util/FormItemInputContext.js +1 -2
  520. package/es/tntd-select/_util/PurePanel.js +59 -48
  521. package/es/tntd-select/_util/SizeContext.js +1 -2
  522. package/es/tntd-select/_util/context.js +5 -7
  523. package/es/tntd-select/_util/defaultRenderEmpty.js +21 -10
  524. package/es/tntd-select/_util/getIcons.js +72 -50
  525. package/es/tntd-select/_util/interface.js +1 -2
  526. package/es/tntd-select/_util/motion.js +35 -26
  527. package/es/tntd-select/_util/type.js +1 -2
  528. package/es/tntd-select/_util/useCompactItemContext.js +22 -20
  529. package/es/tntd-select/_util/warning.js +9 -10
  530. package/es/tntd-select/index.js +593 -505
  531. package/es/tntd-select/rc-select/BaseSelect.js +486 -391
  532. package/es/tntd-select/rc-select/OptGroup.js +1 -2
  533. package/es/tntd-select/rc-select/Option.js +1 -2
  534. package/es/tntd-select/rc-select/OptionList.js +315 -226
  535. package/es/tntd-select/rc-select/Select.js +375 -363
  536. package/es/tntd-select/rc-select/SelectContext.js +1 -2
  537. package/es/tntd-select/rc-select/SelectTrigger.js +119 -80
  538. package/es/tntd-select/rc-select/Selector/Input.js +96 -40
  539. package/es/tntd-select/rc-select/Selector/MultipleSelector.js +155 -81
  540. package/es/tntd-select/rc-select/Selector/SingleSelector.js +92 -39
  541. package/es/tntd-select/rc-select/Selector/index.js +138 -116
  542. package/es/tntd-select/rc-select/TransBtn.js +33 -19
  543. package/es/tntd-select/rc-select/hooks/useAllowClear.js +21 -22
  544. package/es/tntd-select/rc-select/hooks/useBaseProps.js +2 -3
  545. package/es/tntd-select/rc-select/hooks/useCache.js +33 -29
  546. package/es/tntd-select/rc-select/hooks/useDelayReset.js +17 -18
  547. package/es/tntd-select/rc-select/hooks/useFilterOptions.js +48 -48
  548. package/es/tntd-select/rc-select/hooks/useId.js +17 -19
  549. package/es/tntd-select/rc-select/hooks/useLayoutEffect.js +8 -10
  550. package/es/tntd-select/rc-select/hooks/useLock.js +16 -17
  551. package/es/tntd-select/rc-select/hooks/useOptions.js +35 -37
  552. package/es/tntd-select/rc-select/hooks/useRefFunc.js +7 -8
  553. package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js +26 -30
  554. package/es/tntd-select/rc-select/index.js +1 -2
  555. package/es/tntd-select/rc-select/interface.js +1 -2
  556. package/es/tntd-select/rc-select/utils/commonUtil.js +16 -18
  557. package/es/tntd-select/rc-select/utils/keyUtil.js +6 -31
  558. package/es/tntd-select/rc-select/utils/legacyUtil.js +49 -26
  559. package/es/tntd-select/rc-select/utils/platformUtil.js +2 -3
  560. package/es/tntd-select/rc-select/utils/valueUtil.js +93 -80
  561. package/es/tntd-select/rc-select/utils/warningPropsUtil.js +96 -84
  562. package/es/tooltip/index.js +1 -2
  563. package/es/tooltip/style/index.js +2 -0
  564. package/es/tooltip/style/index.js.map +1 -0
  565. package/es/tooltip/style/index.less +187 -0
  566. package/es/transfer/index.js +1 -2
  567. package/es/transfer/style/customize.less +62 -0
  568. package/es/transfer/style/index.js +7 -0
  569. package/es/transfer/style/index.js.map +1 -0
  570. package/es/transfer/style/index.less +191 -0
  571. package/es/tree/index.js +1 -2
  572. package/es/tree/style/directory.less +95 -0
  573. package/es/tree/style/index.js +2 -0
  574. package/es/tree/style/index.js.map +1 -0
  575. package/es/tree/style/index.less +280 -0
  576. package/es/tree/style/mixin.less +29 -0
  577. package/es/tree-select/index.js +1 -2
  578. package/es/tree-select/style/index.js +6 -0
  579. package/es/tree-select/style/index.js.map +1 -0
  580. package/es/tree-select/style/index.less +191 -0
  581. package/es/typography/index.js +1 -2
  582. package/es/typography/style/index.js +5 -0
  583. package/es/typography/style/index.js.map +1 -0
  584. package/es/typography/style/index.less +204 -0
  585. package/es/upload/index.js +4 -3
  586. package/es/upload/style/index.js +5 -0
  587. package/es/upload/style/index.js.map +1 -0
  588. package/es/upload/style/index.less +542 -0
  589. package/es/utils/checkAuth.js +24 -21
  590. package/es/utils/findMenuInfoByPath.js +33 -30
  591. package/es/utils/index.js +71 -65
  592. package/es/utils/lang.js +63 -108
  593. package/es/utils/lang.js.map +1 -1
  594. package/es/utils/simple-template.js +2 -3
  595. package/es/version/index.js +1 -2
  596. package/es/version/style/index.js +2 -0
  597. package/es/version/style/index.js.map +1 -0
  598. package/es/water-mark/index.js +98 -87
  599. package/lib/_util/context.js +18 -16
  600. package/lib/_util/defaultRenderEmpty.js +35 -39
  601. package/lib/_util/defaultRenderEmpty.js.map +1 -1
  602. package/lib/_util/hooks/useFlexGapSupport.js +25 -32
  603. package/lib/_util/hooks/useForceUpdate.js +21 -29
  604. package/lib/_util/motion.js +51 -34
  605. package/lib/_util/reactNode.js +20 -37
  606. package/lib/_util/responsiveObserve.js +70 -58
  607. package/lib/_util/styleChecker.js +37 -30
  608. package/lib/_util/type.js +17 -5
  609. package/lib/_util/warning.js +17 -29
  610. package/lib/actions/index.js +31 -14
  611. package/lib/affix/index.d.ts +3 -3
  612. package/lib/affix/index.js +23 -22
  613. package/lib/affix/index.js.map +1 -1
  614. package/lib/affix/style/index.d.ts +3 -0
  615. package/lib/affix/style/index.d.ts.map +1 -0
  616. package/lib/affix/style/index.js +4 -0
  617. package/lib/affix/style/index.js.map +1 -0
  618. package/lib/affix/style/index.less +6 -0
  619. package/lib/alert/index.d.ts +3 -3
  620. package/lib/alert/index.js +23 -22
  621. package/lib/alert/index.js.map +1 -1
  622. package/lib/alert/style/index.d.ts +3 -0
  623. package/lib/alert/style/index.d.ts.map +1 -0
  624. package/lib/alert/style/index.js +4 -0
  625. package/lib/alert/style/index.js.map +1 -0
  626. package/lib/alert/style/index.less +188 -0
  627. package/lib/anchor/index.d.ts +3 -3
  628. package/lib/anchor/index.js +23 -22
  629. package/lib/anchor/index.js.map +1 -1
  630. package/lib/anchor/style/index.d.ts +4 -0
  631. package/lib/anchor/style/index.d.ts.map +1 -0
  632. package/lib/anchor/style/index.js +5 -0
  633. package/lib/anchor/style/index.js.map +1 -0
  634. package/lib/anchor/style/index.less +82 -0
  635. package/lib/array-input/icon.js +33 -12
  636. package/lib/array-input/index.js +254 -150
  637. package/lib/auth-context/index.js +10 -4
  638. package/lib/auto-complete/index.d.ts +3 -3
  639. package/lib/auto-complete/index.js +23 -22
  640. package/lib/auto-complete/index.js.map +1 -1
  641. package/lib/auto-complete/style/index.d.ts +5 -0
  642. package/lib/auto-complete/style/index.d.ts.map +1 -0
  643. package/lib/auto-complete/style/index.js +6 -0
  644. package/lib/auto-complete/style/index.js.map +1 -0
  645. package/lib/auto-complete/style/index.less +92 -0
  646. package/lib/avatar/index.d.ts +3 -3
  647. package/lib/avatar/index.js +23 -22
  648. package/lib/avatar/index.js.map +1 -1
  649. package/lib/avatar/style/index.d.ts +3 -0
  650. package/lib/avatar/style/index.d.ts.map +1 -0
  651. package/lib/avatar/style/index.js +4 -0
  652. package/lib/avatar/style/index.js.map +1 -0
  653. package/lib/avatar/style/index.less +59 -0
  654. package/lib/back-top/index.d.ts +3 -3
  655. package/lib/back-top/index.js +23 -22
  656. package/lib/back-top/index.js.map +1 -1
  657. package/lib/back-top/style/index.d.ts +3 -0
  658. package/lib/back-top/style/index.d.ts.map +1 -0
  659. package/lib/back-top/style/index.js +4 -0
  660. package/lib/back-top/style/index.js.map +1 -0
  661. package/lib/back-top/style/index.less +42 -0
  662. package/lib/back-top/style/responsive.less +11 -0
  663. package/lib/badge/index.d.ts +3 -3
  664. package/lib/badge/index.js +23 -22
  665. package/lib/badge/index.js.map +1 -1
  666. package/lib/badge/style/index.d.ts +3 -0
  667. package/lib/badge/style/index.d.ts.map +1 -0
  668. package/lib/badge/style/index.js +4 -0
  669. package/lib/badge/style/index.js.map +1 -0
  670. package/lib/badge/style/index.less +190 -0
  671. package/lib/breadcrumb/index.d.ts +3 -3
  672. package/lib/breadcrumb/index.js +23 -22
  673. package/lib/breadcrumb/index.js.map +1 -1
  674. package/lib/breadcrumb/style/index.d.ts +5 -0
  675. package/lib/breadcrumb/style/index.d.ts.map +1 -0
  676. package/lib/breadcrumb/style/index.js +6 -0
  677. package/lib/breadcrumb/style/index.js.map +1 -0
  678. package/lib/breadcrumb/style/index.less +51 -0
  679. package/lib/button/button.d.ts +4 -4
  680. package/lib/button/button.js +62 -59
  681. package/lib/button/button.js.map +1 -1
  682. package/lib/button/index.d.ts +1 -1
  683. package/lib/button/index.js +20 -19
  684. package/lib/button/index.js.map +1 -1
  685. package/lib/button/style/index.d.ts +3 -0
  686. package/lib/button/style/index.d.ts.map +1 -0
  687. package/lib/button/style/index.js +4 -0
  688. package/lib/button/style/index.js.map +1 -0
  689. package/lib/button/style/index.less +224 -0
  690. package/lib/button/style/mixin.less +357 -0
  691. package/lib/calendar/index.d.ts +3 -3
  692. package/lib/calendar/index.js +23 -22
  693. package/lib/calendar/index.js.map +1 -1
  694. package/lib/calendar/style/index.d.ts +5 -0
  695. package/lib/calendar/style/index.d.ts.map +1 -0
  696. package/lib/calendar/style/index.js +6 -0
  697. package/lib/calendar/style/index.js.map +1 -0
  698. package/lib/calendar/style/index.less +278 -0
  699. package/lib/card/card.d.ts +3 -3
  700. package/lib/card/card.js +45 -51
  701. package/lib/card/card.js.map +1 -1
  702. package/lib/card/index.d.ts +1 -1
  703. package/lib/card/index.js +20 -19
  704. package/lib/card/index.js.map +1 -1
  705. package/lib/card/style/index.d.ts +6 -0
  706. package/lib/card/style/index.d.ts.map +1 -0
  707. package/lib/card/style/index.js +7 -0
  708. package/lib/card/style/index.js.map +1 -0
  709. package/lib/card/style/index.less +263 -0
  710. package/lib/card/style/size.less +25 -0
  711. package/lib/carousel/index.d.ts +3 -3
  712. package/lib/carousel/index.js +23 -22
  713. package/lib/carousel/index.js.map +1 -1
  714. package/lib/carousel/style/index.d.ts +3 -0
  715. package/lib/carousel/style/index.d.ts.map +1 -0
  716. package/lib/carousel/style/index.js +4 -0
  717. package/lib/carousel/style/index.js.map +1 -0
  718. package/lib/carousel/style/index.less +238 -0
  719. package/lib/cascader/index.d.ts +3 -3
  720. package/lib/cascader/index.js +29 -26
  721. package/lib/cascader/index.js.map +1 -1
  722. package/lib/cascader/style/index.d.ts +5 -0
  723. package/lib/cascader/style/index.d.ts.map +1 -0
  724. package/lib/cascader/style/index.js +6 -0
  725. package/lib/cascader/style/index.js.map +1 -0
  726. package/lib/cascader/style/index.less +227 -0
  727. package/lib/check-card/group.js +228 -171
  728. package/lib/check-card/index.js +171 -141
  729. package/lib/checkbox/checkbox-group.d.ts +2 -2
  730. package/lib/checkbox/checkbox-group.js +11 -9
  731. package/lib/checkbox/checkbox-group.js.map +1 -1
  732. package/lib/checkbox/index.d.ts +3 -3
  733. package/lib/checkbox/index.js +37 -25
  734. package/lib/checkbox/index.js.map +1 -1
  735. package/lib/checkbox/style/index.d.ts +3 -0
  736. package/lib/checkbox/style/index.d.ts.map +1 -0
  737. package/lib/checkbox/style/index.js +4 -0
  738. package/lib/checkbox/style/index.js.map +1 -0
  739. package/lib/checkbox/style/index.less +4 -0
  740. package/lib/checkbox/style/mixin.less +220 -0
  741. package/lib/col/index.d.ts +3 -3
  742. package/lib/col/index.js +23 -22
  743. package/lib/col/index.js.map +1 -1
  744. package/lib/col/style/index.d.ts +3 -0
  745. package/lib/col/style/index.d.ts.map +1 -0
  746. package/lib/col/style/index.js +4 -0
  747. package/lib/col/style/index.js.map +1 -0
  748. package/lib/collapse/index.d.ts +3 -3
  749. package/lib/collapse/index.js +24 -23
  750. package/lib/collapse/index.js.map +1 -1
  751. package/lib/collapse/style/index.d.ts +3 -0
  752. package/lib/collapse/style/index.d.ts.map +1 -0
  753. package/lib/collapse/style/index.js +4 -0
  754. package/lib/collapse/style/index.js.map +1 -0
  755. package/lib/collapse/style/index.less +134 -0
  756. package/lib/color-picker/ColorPicker.js +156 -113
  757. package/lib/color-picker/index.js +18 -14
  758. package/lib/color-picker/index.js.map +1 -1
  759. package/lib/columns/index.js +81 -41
  760. package/lib/columns/style/index.js +1 -2
  761. package/lib/comment/index.d.ts +3 -3
  762. package/lib/comment/index.js +23 -22
  763. package/lib/comment/index.js.map +1 -1
  764. package/lib/comment/style/index.d.ts +3 -0
  765. package/lib/comment/style/index.d.ts.map +1 -0
  766. package/lib/comment/style/index.js +4 -0
  767. package/lib/comment/style/index.js.map +1 -0
  768. package/lib/comment/style/index.less +93 -0
  769. package/lib/config-provider/DisabledContext.js +18 -31
  770. package/lib/config-provider/SizeContext.js +19 -28
  771. package/lib/config-provider/config-provider.d.ts +1 -1
  772. package/lib/config-provider/config-provider.js +12 -8
  773. package/lib/config-provider/config-provider.js.map +1 -1
  774. package/lib/config-provider/index.d.ts +4 -4
  775. package/lib/config-provider/index.js +35 -23
  776. package/lib/config-provider/index.js.map +1 -1
  777. package/lib/config-provider/style/index.d.ts +2 -0
  778. package/lib/config-provider/style/index.d.ts.map +1 -0
  779. package/lib/config-provider/style/index.js +3 -0
  780. package/lib/config-provider/style/index.js.map +1 -0
  781. package/lib/config-provider/style/index.less +2 -0
  782. package/lib/connect/index.js +44 -26
  783. package/lib/date-picker/index.d.ts +4 -4
  784. package/lib/date-picker/index.js +48 -32
  785. package/lib/date-picker/index.js.map +1 -1
  786. package/lib/date-picker/style/Calendar.less +402 -0
  787. package/lib/date-picker/style/DecadePanel.less +81 -0
  788. package/lib/date-picker/style/MonthPanel.less +86 -0
  789. package/lib/date-picker/style/MonthPicker.less +11 -0
  790. package/lib/date-picker/style/Picker.less +113 -0
  791. package/lib/date-picker/style/RangePicker.less +248 -0
  792. package/lib/date-picker/style/TimePicker.less +151 -0
  793. package/lib/date-picker/style/WeekPicker.less +21 -0
  794. package/lib/date-picker/style/YearPanel.less +85 -0
  795. package/lib/date-picker/style/index.d.ts +6 -0
  796. package/lib/date-picker/style/index.d.ts.map +1 -0
  797. package/lib/date-picker/style/index.js +7 -0
  798. package/lib/date-picker/style/index.js.map +1 -0
  799. package/lib/date-picker/style/index.less +17 -0
  800. package/lib/descriptions/descriptions.d.ts +4 -4
  801. package/lib/descriptions/descriptions.d.ts.map +1 -1
  802. package/lib/descriptions/descriptions.js +64 -55
  803. package/lib/descriptions/descriptions.js.map +1 -1
  804. package/lib/descriptions/index.d.ts +1 -1
  805. package/lib/descriptions/index.js +23 -22
  806. package/lib/descriptions/index.js.map +1 -1
  807. package/lib/descriptions/style/index.d.ts +3 -0
  808. package/lib/descriptions/style/index.d.ts.map +1 -0
  809. package/lib/descriptions/style/index.js +4 -0
  810. package/lib/descriptions/style/index.js.map +1 -0
  811. package/lib/descriptions/style/index.less +144 -0
  812. package/lib/development-login/LoginModal.js +110 -79
  813. package/lib/development-login/index.js +42 -35
  814. package/lib/divider/index.d.ts +3 -3
  815. package/lib/divider/index.js +23 -22
  816. package/lib/divider/index.js.map +1 -1
  817. package/lib/divider/style/index.d.ts +3 -0
  818. package/lib/divider/style/index.d.ts.map +1 -0
  819. package/lib/divider/style/index.js +4 -0
  820. package/lib/divider/style/index.js.map +1 -0
  821. package/lib/divider/style/index.less +109 -0
  822. package/lib/drawer/drawer.d.ts +1 -1
  823. package/lib/drawer/drawer.js +41 -30
  824. package/lib/drawer/drawer.js.map +1 -1
  825. package/lib/drawer/index.d.ts +2 -2
  826. package/lib/drawer/index.js +22 -20
  827. package/lib/drawer/index.js.map +1 -1
  828. package/lib/drawer/style/drawer.less +230 -0
  829. package/lib/drawer/style/index.d.ts +3 -0
  830. package/lib/drawer/style/index.d.ts.map +1 -0
  831. package/lib/drawer/style/index.js +4 -0
  832. package/lib/drawer/style/index.js.map +1 -0
  833. package/lib/drawer/style/index.less +3 -0
  834. package/lib/dropdown/index.d.ts +3 -3
  835. package/lib/dropdown/index.js +23 -22
  836. package/lib/dropdown/index.js.map +1 -1
  837. package/lib/dropdown/style/index.d.ts +4 -0
  838. package/lib/dropdown/style/index.d.ts.map +1 -0
  839. package/lib/dropdown/style/index.js +5 -0
  840. package/lib/dropdown/style/index.js.map +1 -0
  841. package/lib/dropdown/style/index.less +282 -0
  842. package/lib/ellipsis/Svg/CopySVG.js +70 -20
  843. package/lib/ellipsis/Svg/TickSVG.js +48 -15
  844. package/lib/ellipsis/index.js +176 -137
  845. package/lib/empty/empty.d.ts +2 -2
  846. package/lib/empty/empty.js +90 -75
  847. package/lib/empty/empty.js.map +1 -1
  848. package/lib/empty/empty.stories.js +19 -18
  849. package/lib/empty/index.d.ts +1 -1
  850. package/lib/empty/index.js +20 -19
  851. package/lib/empty/index.js.map +1 -1
  852. package/lib/empty/style/index.d.ts +3 -0
  853. package/lib/empty/style/index.d.ts.map +1 -0
  854. package/lib/empty/style/index.js +4 -0
  855. package/lib/empty/style/index.js.map +1 -0
  856. package/lib/empty/style/index.less +52 -0
  857. package/lib/exception/exception.js +46 -31
  858. package/lib/exception/exception.js.map +1 -1
  859. package/lib/exception/index.js +19 -18
  860. package/lib/form/form.d.ts +5 -5
  861. package/lib/form/form.js +90 -92
  862. package/lib/form/form.js.map +1 -1
  863. package/lib/form/index.d.ts +1 -1
  864. package/lib/form/index.js +20 -19
  865. package/lib/form/index.js.map +1 -1
  866. package/lib/form/style/index.d.ts +4 -0
  867. package/lib/form/style/index.d.ts.map +1 -0
  868. package/lib/form/style/index.js +5 -0
  869. package/lib/form/style/index.js.map +1 -0
  870. package/lib/form/style/index.less +653 -0
  871. package/lib/form/style/mixin.less +126 -0
  872. package/lib/grid/RowContext.js +9 -5
  873. package/lib/grid/col.js +95 -96
  874. package/lib/grid/hooks/useBreakpoint.js +27 -22
  875. package/lib/grid/index.js +26 -15
  876. package/lib/grid/row.js +176 -158
  877. package/lib/grid/style/index.js +2 -4
  878. package/lib/grid-v4/RowContext.d.ts +9 -0
  879. package/lib/grid-v4/RowContext.d.ts.map +1 -0
  880. package/lib/grid-v4/RowContext.js +10 -0
  881. package/lib/grid-v4/RowContext.js.map +1 -0
  882. package/lib/grid-v4/col.d.ts +29 -0
  883. package/lib/grid-v4/col.d.ts.map +1 -0
  884. package/lib/grid-v4/col.js +105 -0
  885. package/lib/grid-v4/col.js.map +1 -0
  886. package/lib/grid-v4/hooks/useBreakpoint.d.ts +4 -0
  887. package/lib/grid-v4/hooks/useBreakpoint.d.ts.map +1 -0
  888. package/lib/grid-v4/hooks/useBreakpoint.js +29 -0
  889. package/lib/grid-v4/hooks/useBreakpoint.js.map +1 -0
  890. package/lib/grid-v4/index.d.ts +12 -0
  891. package/lib/grid-v4/index.d.ts.map +1 -0
  892. package/lib/grid-v4/index.js +31 -0
  893. package/lib/grid-v4/index.js.map +1 -0
  894. package/lib/grid-v4/row.d.ts +21 -0
  895. package/lib/grid-v4/row.d.ts.map +1 -0
  896. package/lib/grid-v4/row.js +187 -0
  897. package/lib/grid-v4/row.js.map +1 -0
  898. package/lib/grid-v4/style/index.d.ts +2 -0
  899. package/lib/grid-v4/style/index.d.ts.map +1 -0
  900. package/lib/grid-v4/style/index.js +3 -0
  901. package/lib/grid-v4/style/index.js.map +1 -0
  902. package/lib/grid-v4/style/index.less +124 -0
  903. package/lib/grid-v4/style/mixin.less +57 -0
  904. package/lib/grid-v4/style/rtl.less +69 -0
  905. package/lib/handle/handle.js +174 -123
  906. package/lib/handle/index.js +166 -125
  907. package/lib/handle/index.js.map +1 -1
  908. package/lib/icon/index.d.ts +3 -3
  909. package/lib/icon/index.js +23 -22
  910. package/lib/icon/index.js.map +1 -1
  911. package/lib/icon/style/index.d.ts +3 -0
  912. package/lib/icon/style/index.d.ts.map +1 -0
  913. package/lib/icon/style/index.js +4 -0
  914. package/lib/icon/style/index.js.map +1 -0
  915. package/lib/icon/style/index.less +4 -0
  916. package/lib/icon-list/index.js +7 -121
  917. package/lib/img/Contain.js +69 -44
  918. package/lib/img/Cover.js +117 -78
  919. package/lib/img/index.js +74 -60
  920. package/lib/index.js +662 -201
  921. package/lib/input/index.d.ts +1 -1
  922. package/lib/input/index.js +21 -20
  923. package/lib/input/index.js.map +1 -1
  924. package/lib/input/input.d.ts +9 -9
  925. package/lib/input/input.d.ts.map +1 -1
  926. package/lib/input/input.js +100 -90
  927. package/lib/input/input.js.map +1 -1
  928. package/lib/input/style/index.d.ts +4 -0
  929. package/lib/input/style/index.d.ts.map +1 -0
  930. package/lib/input/style/index.js +5 -0
  931. package/lib/input/style/index.js.map +1 -0
  932. package/lib/input/style/index.less +57 -0
  933. package/lib/input/style/mixin.less +449 -0
  934. package/lib/input/style/search-input.less +34 -0
  935. package/lib/input-number/index.d.ts +4 -4
  936. package/lib/input-number/index.js +26 -24
  937. package/lib/input-number/index.js.map +1 -1
  938. package/lib/input-number/style/index.d.ts +3 -0
  939. package/lib/input-number/style/index.d.ts.map +1 -0
  940. package/lib/input-number/style/index.js +4 -0
  941. package/lib/input-number/style/index.js.map +1 -0
  942. package/lib/input-number/style/index.less +179 -0
  943. package/lib/label/index.d.ts +2 -2
  944. package/lib/label/index.js +134 -137
  945. package/lib/label/index.js.map +1 -1
  946. package/lib/layout/index.d.ts +3 -3
  947. package/lib/layout/index.js +23 -22
  948. package/lib/layout/index.js.map +1 -1
  949. package/lib/layout/style/index.d.ts +3 -0
  950. package/lib/layout/style/index.d.ts.map +1 -0
  951. package/lib/layout/style/index.js +4 -0
  952. package/lib/layout/style/index.js.map +1 -0
  953. package/lib/layout/style/index.less +124 -0
  954. package/lib/layout/style/light.less +15 -0
  955. package/lib/list/index.d.ts +3 -3
  956. package/lib/list/index.js +23 -22
  957. package/lib/list/index.js.map +1 -1
  958. package/lib/list/style/bordered.less +41 -0
  959. package/lib/list/style/index.d.ts +7 -0
  960. package/lib/list/style/index.d.ts.map +1 -0
  961. package/lib/list/style/index.js +8 -0
  962. package/lib/list/style/index.js.map +1 -0
  963. package/lib/list/style/index.less +234 -0
  964. package/lib/list/style/responsive.less +40 -0
  965. package/lib/loading-button/index.js +58 -55
  966. package/lib/locale/default.js +12 -10
  967. package/lib/locale/default.js.map +1 -1
  968. package/lib/locale/en_US.js +50 -47
  969. package/lib/locale/en_US.js.map +1 -1
  970. package/lib/locale/index.js +36 -18
  971. package/lib/locale/zh_CN.js +42 -40
  972. package/lib/locale/zh_CN.js.map +1 -1
  973. package/lib/locale-provider/index.d.ts +3 -3
  974. package/lib/locale-provider/index.js +26 -25
  975. package/lib/locale-provider/index.js.map +1 -1
  976. package/lib/locale-provider/style/index.d.ts +2 -0
  977. package/lib/locale-provider/style/index.d.ts.map +1 -0
  978. package/lib/locale-provider/style/index.js +3 -0
  979. package/lib/locale-provider/style/index.js.map +1 -0
  980. package/lib/locale-provider/style/index.less +2 -0
  981. package/lib/mentions/index.d.ts +3 -3
  982. package/lib/mentions/index.js +23 -22
  983. package/lib/mentions/index.js.map +1 -1
  984. package/lib/mentions/style/index.d.ts +4 -0
  985. package/lib/mentions/style/index.d.ts.map +1 -0
  986. package/lib/mentions/style/index.js +5 -0
  987. package/lib/mentions/style/index.js.map +1 -0
  988. package/lib/mentions/style/index.less +164 -0
  989. package/lib/menu/index.d.ts +3 -3
  990. package/lib/menu/index.js +23 -22
  991. package/lib/menu/index.js.map +1 -1
  992. package/lib/menu/style/dark.less +139 -0
  993. package/lib/menu/style/index.d.ts +4 -0
  994. package/lib/menu/style/index.d.ts.map +1 -0
  995. package/lib/menu/style/index.js +5 -0
  996. package/lib/menu/style/index.js.map +1 -0
  997. package/lib/menu/style/index.less +515 -0
  998. package/lib/message/index.d.ts +3 -3
  999. package/lib/message/index.js +23 -22
  1000. package/lib/message/index.js.map +1 -1
  1001. package/lib/message/style/index.d.ts +3 -0
  1002. package/lib/message/style/index.d.ts.map +1 -0
  1003. package/lib/message/style/index.js +4 -0
  1004. package/lib/message/style/index.js.map +1 -0
  1005. package/lib/message/style/index.less +75 -0
  1006. package/lib/modal/index.d.ts +1 -1
  1007. package/lib/modal/index.js +22 -21
  1008. package/lib/modal/index.js.map +1 -1
  1009. package/lib/modal/modal.d.ts +4 -4
  1010. package/lib/modal/modal.js +59 -59
  1011. package/lib/modal/modal.js.map +1 -1
  1012. package/lib/modal/style/confirm.less +78 -0
  1013. package/lib/modal/style/index.d.ts +4 -0
  1014. package/lib/modal/style/index.d.ts.map +1 -0
  1015. package/lib/modal/style/index.js +5 -0
  1016. package/lib/modal/style/index.js.map +1 -0
  1017. package/lib/modal/style/index.less +4 -0
  1018. package/lib/modal/style/modal.less +165 -0
  1019. package/lib/notification/index.d.ts +3 -3
  1020. package/lib/notification/index.js +23 -22
  1021. package/lib/notification/index.js.map +1 -1
  1022. package/lib/notification/style/index.d.ts +3 -0
  1023. package/lib/notification/style/index.d.ts.map +1 -0
  1024. package/lib/notification/style/index.js +4 -0
  1025. package/lib/notification/style/index.js.map +1 -0
  1026. package/lib/notification/style/index.less +199 -0
  1027. package/lib/page/Box.js +66 -40
  1028. package/lib/page/index.js +148 -95
  1029. package/lib/page/utils.js +22 -16
  1030. package/lib/page-header/index.d.ts +3 -3
  1031. package/lib/page-header/index.js +23 -22
  1032. package/lib/page-header/index.js.map +1 -1
  1033. package/lib/page-header/style/index.d.ts +4 -0
  1034. package/lib/page-header/style/index.d.ts.map +1 -0
  1035. package/lib/page-header/style/index.js +5 -0
  1036. package/lib/page-header/style/index.js.map +1 -0
  1037. package/lib/page-header/style/index.less +119 -0
  1038. package/lib/pagination/index.d.ts +3 -3
  1039. package/lib/pagination/index.js +23 -22
  1040. package/lib/pagination/index.js.map +1 -1
  1041. package/lib/pagination/style/index.d.ts +4 -0
  1042. package/lib/pagination/style/index.d.ts.map +1 -0
  1043. package/lib/pagination/style/index.js +5 -0
  1044. package/lib/pagination/style/index.js.map +1 -0
  1045. package/lib/pagination/style/index.less +400 -0
  1046. package/lib/popconfirm/index.d.ts +3 -3
  1047. package/lib/popconfirm/index.js +23 -22
  1048. package/lib/popconfirm/index.js.map +1 -1
  1049. package/lib/popconfirm/style/index.d.ts +4 -0
  1050. package/lib/popconfirm/style/index.d.ts.map +1 -0
  1051. package/lib/popconfirm/style/index.js +5 -0
  1052. package/lib/popconfirm/style/index.js.map +1 -0
  1053. package/lib/popover/index.d.ts +3 -3
  1054. package/lib/popover/index.js +23 -22
  1055. package/lib/popover/index.js.map +1 -1
  1056. package/lib/popover/style/index.d.ts +3 -0
  1057. package/lib/popover/style/index.d.ts.map +1 -0
  1058. package/lib/popover/style/index.js +4 -0
  1059. package/lib/popover/style/index.js.map +1 -0
  1060. package/lib/popover/style/index.less +205 -0
  1061. package/lib/prev-locale.js +68 -54
  1062. package/lib/preview-text/index.d.ts +4 -4
  1063. package/lib/preview-text/index.js +263 -209
  1064. package/lib/preview-text/index.js.map +1 -1
  1065. package/lib/progress/index.d.ts +3 -3
  1066. package/lib/progress/index.js +23 -22
  1067. package/lib/progress/index.js.map +1 -1
  1068. package/lib/progress/style/index.d.ts +3 -0
  1069. package/lib/progress/style/index.d.ts.map +1 -0
  1070. package/lib/progress/style/index.js +4 -0
  1071. package/lib/progress/style/index.js.map +1 -0
  1072. package/lib/progress/style/index.less +182 -0
  1073. package/lib/query-form/Field/Checkbox.js +28 -22
  1074. package/lib/query-form/Field/Select.js +79 -68
  1075. package/lib/query-form/Field/SelectInput.js +87 -73
  1076. package/lib/query-form/Field/fieldsMap.d.ts +3 -3
  1077. package/lib/query-form/Field/fieldsMap.js +34 -32
  1078. package/lib/query-form/Field/index.js +143 -96
  1079. package/lib/query-form/createActions.js +53 -50
  1080. package/lib/query-form/index.js +377 -286
  1081. package/lib/query-form/useForm.js +11 -11
  1082. package/lib/query-list-scene/List.js +360 -289
  1083. package/lib/query-list-scene/QueryForm.js +161 -103
  1084. package/lib/query-list-scene/QueryListScene.js +66 -31
  1085. package/lib/query-list-scene/Title.js +15 -9
  1086. package/lib/query-list-scene/Toolbar.js +31 -20
  1087. package/lib/query-list-scene/createActions.js +79 -64
  1088. package/lib/query-list-scene/index.js +28 -24
  1089. package/lib/query-list-scene/useActions.js +11 -11
  1090. package/lib/radio/index.d.ts +3 -3
  1091. package/lib/radio/index.js +26 -24
  1092. package/lib/radio/index.js.map +1 -1
  1093. package/lib/radio/radio-group.d.ts +2 -2
  1094. package/lib/radio/radio-group.js +11 -9
  1095. package/lib/radio/radio-group.js.map +1 -1
  1096. package/lib/radio/style/index.d.ts +3 -0
  1097. package/lib/radio/style/index.d.ts.map +1 -0
  1098. package/lib/radio/style/index.js +4 -0
  1099. package/lib/radio/style/index.js.map +1 -0
  1100. package/lib/radio/style/index.less +327 -0
  1101. package/lib/rate/index.d.ts +3 -3
  1102. package/lib/rate/index.js +23 -22
  1103. package/lib/rate/index.js.map +1 -1
  1104. package/lib/rate/style/index.d.ts +4 -0
  1105. package/lib/rate/style/index.d.ts.map +1 -0
  1106. package/lib/rate/style/index.js +5 -0
  1107. package/lib/rate/style/index.js.map +1 -0
  1108. package/lib/rate/style/index.less +85 -0
  1109. package/lib/render-empty/index.js +8 -4
  1110. package/lib/render-empty/render-empty.js +28 -22
  1111. package/lib/render-empty/render-empty.js.map +1 -1
  1112. package/lib/result/index.d.ts +3 -3
  1113. package/lib/result/index.js +23 -22
  1114. package/lib/result/index.js.map +1 -1
  1115. package/lib/result/style/index.d.ts +3 -0
  1116. package/lib/result/style/index.d.ts.map +1 -0
  1117. package/lib/result/style/index.js +4 -0
  1118. package/lib/result/style/index.js.map +1 -0
  1119. package/lib/result/style/index.less +71 -0
  1120. package/lib/row/index.d.ts +3 -3
  1121. package/lib/row/index.js +23 -22
  1122. package/lib/row/index.js.map +1 -1
  1123. package/lib/row/style/index.d.ts +3 -0
  1124. package/lib/row/style/index.d.ts.map +1 -0
  1125. package/lib/row/style/index.js +4 -0
  1126. package/lib/row/style/index.js.map +1 -0
  1127. package/lib/segmented/index.d.ts +1 -1
  1128. package/lib/segmented/index.d.ts.map +1 -1
  1129. package/lib/segmented/index.js +71 -69
  1130. package/lib/select/index.d.ts +2 -2
  1131. package/lib/select/index.js +22 -20
  1132. package/lib/select/index.js.map +1 -1
  1133. package/lib/select/select.d.ts +2 -2
  1134. package/lib/select/select.js +61 -64
  1135. package/lib/select/select.js.map +1 -1
  1136. package/lib/select/style/index.d.ts +4 -0
  1137. package/lib/select/style/index.d.ts.map +1 -0
  1138. package/lib/select/style/index.js +5 -0
  1139. package/lib/select/style/index.js.map +1 -0
  1140. package/lib/select/style/index.less +604 -0
  1141. package/lib/skeleton/index.d.ts +3 -3
  1142. package/lib/skeleton/index.js +23 -22
  1143. package/lib/skeleton/index.js.map +1 -1
  1144. package/lib/skeleton/style/index.d.ts +3 -0
  1145. package/lib/skeleton/style/index.d.ts.map +1 -0
  1146. package/lib/skeleton/style/index.js +4 -0
  1147. package/lib/skeleton/style/index.js.map +1 -0
  1148. package/lib/skeleton/style/index.less +130 -0
  1149. package/lib/slider/index.d.ts +3 -3
  1150. package/lib/slider/index.js +23 -22
  1151. package/lib/slider/index.js.map +1 -1
  1152. package/lib/slider/style/index.d.ts +4 -0
  1153. package/lib/slider/style/index.d.ts.map +1 -0
  1154. package/lib/slider/style/index.js +5 -0
  1155. package/lib/slider/style/index.js.map +1 -0
  1156. package/lib/slider/style/index.less +197 -0
  1157. package/lib/spin/index.d.ts +3 -3
  1158. package/lib/spin/index.js +23 -22
  1159. package/lib/spin/index.js.map +1 -1
  1160. package/lib/spin/style/index.d.ts +3 -0
  1161. package/lib/spin/style/index.d.ts.map +1 -0
  1162. package/lib/spin/style/index.js +4 -0
  1163. package/lib/spin/style/index.js.map +1 -0
  1164. package/lib/spin/style/index.less +214 -0
  1165. package/lib/statistic/index.d.ts +3 -3
  1166. package/lib/statistic/index.js +23 -22
  1167. package/lib/statistic/index.js.map +1 -1
  1168. package/lib/statistic/style/index.d.ts +3 -0
  1169. package/lib/statistic/style/index.d.ts.map +1 -0
  1170. package/lib/statistic/style/index.js +4 -0
  1171. package/lib/statistic/style/index.js.map +1 -0
  1172. package/lib/statistic/style/index.less +40 -0
  1173. package/lib/steps/index.d.ts +1 -1
  1174. package/lib/steps/index.js +20 -19
  1175. package/lib/steps/index.js.map +1 -1
  1176. package/lib/steps/steps.d.ts +3 -3
  1177. package/lib/steps/steps.js +72 -59
  1178. package/lib/steps/steps.js.map +1 -1
  1179. package/lib/steps/style/compatibility.less +50 -0
  1180. package/lib/steps/style/custom-icon.less +31 -0
  1181. package/lib/steps/style/index.d.ts +3 -0
  1182. package/lib/steps/style/index.d.ts.map +1 -0
  1183. package/lib/steps/style/index.js +4 -0
  1184. package/lib/steps/style/index.js.map +1 -0
  1185. package/lib/steps/style/label-placement.less +38 -0
  1186. package/lib/steps/style/progress-dot.less +80 -0
  1187. package/lib/steps/style/vertical.less +74 -0
  1188. package/lib/style/color/bezierEasing.less +110 -0
  1189. package/lib/style/color/colorPalette.less +75 -0
  1190. package/lib/style/color/colors.less +149 -0
  1191. package/lib/style/color/tinyColor.less +1184 -0
  1192. package/lib/style/core/base.less +510 -0
  1193. package/lib/style/core/iconfont.less +19 -0
  1194. package/lib/style/core/index.less +4 -0
  1195. package/lib/style/core/motion/fade.less +31 -0
  1196. package/lib/style/core/motion/move.less +120 -0
  1197. package/lib/style/core/motion/other.less +40 -0
  1198. package/lib/style/core/motion/slide.less +120 -0
  1199. package/lib/style/core/motion/swing.less +34 -0
  1200. package/lib/style/core/motion/zoom.less +162 -0
  1201. package/lib/style/core/motion.less +20 -0
  1202. package/lib/style/index.d.ts +2 -0
  1203. package/lib/style/index.d.ts.map +1 -0
  1204. package/lib/style/index.js +3 -0
  1205. package/lib/style/index.js.map +1 -0
  1206. package/lib/style/index.less +2 -0
  1207. package/lib/style/mixins/clearfix.less +13 -0
  1208. package/lib/style/mixins/compatibility.less +22 -0
  1209. package/lib/style/mixins/iconfont.less +43 -0
  1210. package/lib/style/mixins/index.less +10 -0
  1211. package/lib/style/mixins/motion.less +35 -0
  1212. package/lib/style/mixins/operation-unit.less +18 -0
  1213. package/lib/style/mixins/reset.less +13 -0
  1214. package/lib/style/mixins/size.less +10 -0
  1215. package/lib/style/mixins/typography.less +49 -0
  1216. package/lib/style/themes/default.less +699 -0
  1217. package/lib/style/themes/index.less +1 -0
  1218. package/lib/style/v2-compatible-reset.d.ts +2 -0
  1219. package/lib/style/v2-compatible-reset.d.ts.map +1 -0
  1220. package/lib/style/v2-compatible-reset.js +3 -0
  1221. package/lib/style/v2-compatible-reset.js.map +1 -0
  1222. package/lib/style/v2-compatible-reset.less +51 -0
  1223. package/lib/svg-components/illustration-403.d.ts +1 -1
  1224. package/lib/svg-components/illustration-403.js +217 -84
  1225. package/lib/svg-components/illustration-404.d.ts +1 -1
  1226. package/lib/svg-components/illustration-404.js +301 -101
  1227. package/lib/svg-components/illustration-500.d.ts +1 -1
  1228. package/lib/svg-components/illustration-500.js +332 -109
  1229. package/lib/svg-components/illustration-empty.d.ts +1 -1
  1230. package/lib/svg-components/illustration-empty.js +65 -41
  1231. package/lib/svg-components/illustration-failure.d.ts +1 -1
  1232. package/lib/svg-components/illustration-failure.js +123 -62
  1233. package/lib/svg-components/illustration-no-access.d.ts +1 -1
  1234. package/lib/svg-components/illustration-no-access.js +125 -61
  1235. package/lib/svg-components/illustration-no-chart.d.ts +1 -1
  1236. package/lib/svg-components/illustration-no-chart.js +145 -63
  1237. package/lib/svg-components/illustration-no-result.d.ts +1 -1
  1238. package/lib/svg-components/illustration-no-result.js +103 -58
  1239. package/lib/svg-components/illustration-offline.d.ts +1 -1
  1240. package/lib/svg-components/illustration-offline.js +142 -69
  1241. package/lib/svg-components/illustration-success.d.ts +1 -1
  1242. package/lib/svg-components/illustration-success.js +148 -69
  1243. package/lib/svg-components/index.js +75 -26
  1244. package/lib/switch/index.js +22 -21
  1245. package/lib/switch/style/index.d.ts +3 -0
  1246. package/lib/switch/style/index.d.ts.map +1 -0
  1247. package/lib/switch/style/index.js +4 -0
  1248. package/lib/switch/style/index.js.map +1 -0
  1249. package/lib/switch/style/index.less +178 -0
  1250. package/lib/switch/switch.d.ts +3 -3
  1251. package/lib/switch/switch.js +35 -27
  1252. package/lib/switch/switch.js.map +1 -1
  1253. package/lib/table/assets/image-loading-background.d.ts +1 -1
  1254. package/lib/table/assets/image-loading-background.js +56 -43
  1255. package/lib/table/assets/image-loading.d.ts +1 -1
  1256. package/lib/table/assets/image-loading.js +37 -31
  1257. package/lib/table/constants.js +6 -3
  1258. package/lib/table/context.js +7 -4
  1259. package/lib/table/hooks/index.js +14 -16
  1260. package/lib/table/hooks/use-column-setting.d.ts +1 -1
  1261. package/lib/table/hooks/use-column-setting.js +37 -20
  1262. package/lib/table/hooks/use-column-setting.js.map +1 -1
  1263. package/lib/table/index.d.ts +1 -1
  1264. package/lib/table/index.js +20 -19
  1265. package/lib/table/index.js.map +1 -1
  1266. package/lib/table/style/index.d.ts +9 -0
  1267. package/lib/table/style/index.d.ts.map +1 -0
  1268. package/lib/table/style/index.js +10 -0
  1269. package/lib/table/style/index.js.map +1 -0
  1270. package/lib/table/style/index.less +800 -0
  1271. package/lib/table/style/size.less +179 -0
  1272. package/lib/table/table.d.ts +3 -3
  1273. package/lib/table/table.js +201 -174
  1274. package/lib/table/table.js.map +1 -1
  1275. package/lib/table/table.stories.js +182 -154
  1276. package/lib/table/total-shower.d.ts +2 -2
  1277. package/lib/table/total-shower.js +14 -10
  1278. package/lib/table/total-shower.js.map +1 -1
  1279. package/lib/table/utils.d.ts +1 -1
  1280. package/lib/table/utils.js +24 -25
  1281. package/lib/table/utils.js.map +1 -1
  1282. package/lib/tabs/index.d.ts +1 -1
  1283. package/lib/tabs/index.js +20 -19
  1284. package/lib/tabs/index.js.map +1 -1
  1285. package/lib/tabs/style/card-style.less +186 -0
  1286. package/lib/tabs/style/index.d.ts +3 -0
  1287. package/lib/tabs/style/index.d.ts.map +1 -0
  1288. package/lib/tabs/style/index.js +4 -0
  1289. package/lib/tabs/style/index.js.map +1 -0
  1290. package/lib/tabs/style/index.less +436 -0
  1291. package/lib/tabs/tabPane.js +1 -2
  1292. package/lib/tabs/tabs.d.ts +4 -3
  1293. package/lib/tabs/tabs.d.ts.map +1 -1
  1294. package/lib/tabs/tabs.js +64 -62
  1295. package/lib/tabs/tabs.js.map +1 -1
  1296. package/lib/tag/index.d.ts +3 -3
  1297. package/lib/tag/index.js +23 -22
  1298. package/lib/tag/index.js.map +1 -1
  1299. package/lib/tag/style/index.d.ts +3 -0
  1300. package/lib/tag/style/index.d.ts.map +1 -0
  1301. package/lib/tag/style/index.js +4 -0
  1302. package/lib/tag/style/index.js.map +1 -0
  1303. package/lib/tag/style/index.less +106 -0
  1304. package/lib/time-picker/index.d.ts +4 -4
  1305. package/lib/time-picker/index.js +25 -24
  1306. package/lib/time-picker/index.js.map +1 -1
  1307. package/lib/time-picker/style/index.d.ts +3 -0
  1308. package/lib/time-picker/style/index.d.ts.map +1 -0
  1309. package/lib/time-picker/style/index.js +4 -0
  1310. package/lib/time-picker/style/index.js.map +1 -0
  1311. package/lib/time-picker/style/index.less +246 -0
  1312. package/lib/timeline/index.d.ts +3 -3
  1313. package/lib/timeline/index.js +23 -22
  1314. package/lib/timeline/index.js.map +1 -1
  1315. package/lib/timeline/style/index.d.ts +3 -0
  1316. package/lib/timeline/style/index.d.ts.map +1 -0
  1317. package/lib/timeline/style/index.js +4 -0
  1318. package/lib/timeline/style/index.js.map +1 -0
  1319. package/lib/timeline/style/index.less +167 -0
  1320. package/lib/title/index.js +44 -27
  1321. package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +18 -31
  1322. package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +9 -26
  1323. package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +9 -26
  1324. package/lib/tntd-cascader/AntdCascader/component/context.js +18 -16
  1325. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +36 -39
  1326. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js.map +1 -1
  1327. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +81 -75
  1328. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +31 -50
  1329. package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +1 -1
  1330. package/lib/tntd-cascader/AntdCascader/config/utils.js +29 -27
  1331. package/lib/tntd-cascader/AntdCascader/config/warning.js +19 -35
  1332. package/lib/tntd-cascader/AntdCascader/index.js +216 -162
  1333. package/lib/tntd-cascader/AntdCascader/interface.js +13 -6
  1334. package/lib/tntd-cascader/img/no-data-s.png +0 -0
  1335. package/lib/tntd-cascader/index.js +12 -8
  1336. package/lib/tntd-cascader/rc-cascader/Cascader.js +325 -284
  1337. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +30 -41
  1338. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +198 -152
  1339. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +223 -163
  1340. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +40 -48
  1341. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +179 -166
  1342. package/lib/tntd-cascader/rc-cascader/context.js +11 -27
  1343. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +62 -63
  1344. package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +39 -49
  1345. package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +26 -41
  1346. package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +16 -33
  1347. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +30 -51
  1348. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +75 -65
  1349. package/lib/tntd-cascader/rc-cascader/index.js +9 -7
  1350. package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +49 -38
  1351. package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +42 -39
  1352. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +34 -30
  1353. package/lib/tntd-form/ErrorList.js +99 -77
  1354. package/lib/tntd-form/Form.js +169 -139
  1355. package/lib/tntd-form/FormItem/ItemHolder.js +154 -155
  1356. package/lib/tntd-form/FormItem/index.js +287 -252
  1357. package/lib/tntd-form/FormItemInput.js +88 -62
  1358. package/lib/tntd-form/FormItemLabel.js +99 -94
  1359. package/lib/tntd-form/FormList.js +52 -58
  1360. package/lib/tntd-form/_util/motion.js +51 -34
  1361. package/lib/tntd-form/_util/reactNode.js +20 -37
  1362. package/lib/tntd-form/_util/scrollTo.js +2 -2
  1363. package/lib/tntd-form/_util/type.js +17 -5
  1364. package/lib/tntd-form/_util/warning.js +17 -29
  1365. package/lib/tntd-form/_util/wave.js +2 -2
  1366. package/lib/tntd-form/context.js +47 -59
  1367. package/lib/tntd-form/hooks/useDebounce.js +28 -37
  1368. package/lib/tntd-form/hooks/useForm.js +56 -57
  1369. package/lib/tntd-form/hooks/useFormInstance.js +11 -8
  1370. package/lib/tntd-form/hooks/useFormItemStatus.js +18 -13
  1371. package/lib/tntd-form/hooks/useFrameState.js +51 -63
  1372. package/lib/tntd-form/hooks/useItemRef.js +24 -41
  1373. package/lib/tntd-form/index.js +24 -42
  1374. package/lib/tntd-form/interface.js +6 -4
  1375. package/lib/tntd-form/style/index.js +2 -4
  1376. package/lib/tntd-form/tntd-form.stories.js +913 -437
  1377. package/lib/tntd-form/util.js +18 -19
  1378. package/lib/tntd-form/validateMessagesContext.js +8 -4
  1379. package/lib/tntd-icon/fonts/iconfont.js +36 -53
  1380. package/lib/tntd-icon/index.js +40 -25
  1381. package/lib/tntd-layout/ActionsContext.js +8 -4
  1382. package/lib/tntd-layout/AppList.js +173 -224
  1383. package/lib/tntd-layout/Application.js +75 -111
  1384. package/lib/tntd-layout/Avatar.js +100 -135
  1385. package/lib/tntd-layout/CompatibleLanguage.js +128 -180
  1386. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +117 -146
  1387. package/lib/tntd-layout/EnterpriseLayout/Language.js +73 -90
  1388. package/lib/tntd-layout/EnterpriseLayout/Theme.js +69 -102
  1389. package/lib/tntd-layout/EnterpriseLayout/index.js +28 -17
  1390. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +283 -276
  1391. package/lib/tntd-layout/GlobalNavigation/index.js +108 -115
  1392. package/lib/tntd-layout/Header.js +77 -136
  1393. package/lib/tntd-layout/HeaderActions.js +106 -106
  1394. package/lib/tntd-layout/HeaderNavs.js +78 -107
  1395. package/lib/tntd-layout/HeaderTabs.js +224 -316
  1396. package/lib/tntd-layout/Iconfont.js +11 -7
  1397. package/lib/tntd-layout/Language.js +69 -76
  1398. package/lib/tntd-layout/Layout.js +214 -171
  1399. package/lib/tntd-layout/Logo.js +69 -144
  1400. package/lib/tntd-layout/OrgAppList.js +238 -388
  1401. package/lib/tntd-layout/SideMenu.js +269 -408
  1402. package/lib/tntd-layout/Theme.js +75 -93
  1403. package/lib/tntd-layout/createActions.js +45 -34
  1404. package/lib/tntd-layout/images/avatar/empty.png +0 -0
  1405. package/lib/tntd-layout/images/avatar/female1.png +0 -0
  1406. package/lib/tntd-layout/images/avatar/female2.png +0 -0
  1407. package/lib/tntd-layout/images/avatar/female3.png +0 -0
  1408. package/lib/tntd-layout/images/avatar/female4.png +0 -0
  1409. package/lib/tntd-layout/images/avatar/female5.png +0 -0
  1410. package/lib/tntd-layout/images/avatar/female6.png +0 -0
  1411. package/lib/tntd-layout/images/avatar/male1.png +0 -0
  1412. package/lib/tntd-layout/images/avatar/male2.png +0 -0
  1413. package/lib/tntd-layout/images/avatar/male3.png +0 -0
  1414. package/lib/tntd-layout/images/avatar/male4.png +0 -0
  1415. package/lib/tntd-layout/images/avatar/male5.png +0 -0
  1416. package/lib/tntd-layout/images/avatar/male6.png +0 -0
  1417. package/lib/tntd-layout/images/index.js +68 -66
  1418. package/lib/tntd-layout/index.js +137 -95
  1419. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +131 -182
  1420. package/lib/tntd-layout/paaslayout/Header.js +51 -79
  1421. package/lib/tntd-layout/paaslayout/Logo.js +15 -30
  1422. package/lib/tntd-layout/paaslayout/SideMenu.js +131 -147
  1423. package/lib/tntd-layout/paaslayout/index.js +205 -141
  1424. package/lib/tntd-layout/storage.js +58 -30
  1425. package/lib/tntd-modal/index.js +98 -62
  1426. package/lib/tntd-rc-select/_util/DisabledContext.js +18 -31
  1427. package/lib/tntd-rc-select/_util/FormItemInputContext.js +9 -26
  1428. package/lib/tntd-rc-select/_util/PurePanel.js +84 -78
  1429. package/lib/tntd-rc-select/_util/SizeContext.js +9 -26
  1430. package/lib/tntd-rc-select/_util/context.js +18 -16
  1431. package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +35 -39
  1432. package/lib/tntd-rc-select/_util/defaultRenderEmpty.js.map +1 -1
  1433. package/lib/tntd-rc-select/_util/getIcons.js +81 -75
  1434. package/lib/tntd-rc-select/_util/interface.js +13 -6
  1435. package/lib/tntd-rc-select/_util/motion.js +51 -34
  1436. package/lib/tntd-rc-select/_util/type.js +17 -5
  1437. package/lib/tntd-rc-select/_util/useCompactItemContext.js +31 -50
  1438. package/lib/tntd-rc-select/_util/warning.js +19 -35
  1439. package/lib/tntd-rc-select/img/no-data-s.png +0 -0
  1440. package/lib/tntd-rc-select/index.js +152 -123
  1441. package/lib/tntd-second-page/index.js +60 -33
  1442. package/lib/tntd-second-page/index.js.map +1 -1
  1443. package/lib/tntd-select/DropDownWrap.js +102 -78
  1444. package/lib/tntd-select/_util/DisabledContext.js +18 -31
  1445. package/lib/tntd-select/_util/FormItemInputContext.js +9 -26
  1446. package/lib/tntd-select/_util/PurePanel.js +84 -78
  1447. package/lib/tntd-select/_util/SizeContext.js +9 -26
  1448. package/lib/tntd-select/_util/context.js +18 -16
  1449. package/lib/tntd-select/_util/defaultRenderEmpty.js +35 -39
  1450. package/lib/tntd-select/_util/defaultRenderEmpty.js.map +1 -1
  1451. package/lib/tntd-select/_util/getIcons.js +81 -75
  1452. package/lib/tntd-select/_util/interface.js +13 -6
  1453. package/lib/tntd-select/_util/motion.js +51 -34
  1454. package/lib/tntd-select/_util/type.js +17 -5
  1455. package/lib/tntd-select/_util/useCompactItemContext.js +31 -50
  1456. package/lib/tntd-select/_util/warning.js +19 -35
  1457. package/lib/tntd-select/index.d.ts +2 -2
  1458. package/lib/tntd-select/index.js +638 -543
  1459. package/lib/tntd-select/rc-select/BaseSelect.js +541 -434
  1460. package/lib/tntd-select/rc-select/OptGroup.js +10 -4
  1461. package/lib/tntd-select/rc-select/Option.js +10 -4
  1462. package/lib/tntd-select/rc-select/OptionList.js +352 -265
  1463. package/lib/tntd-select/rc-select/Select.js +464 -411
  1464. package/lib/tntd-select/rc-select/SelectContext.js +11 -27
  1465. package/lib/tntd-select/rc-select/SelectTrigger.js +141 -111
  1466. package/lib/tntd-select/rc-select/Selector/Input.js +106 -71
  1467. package/lib/tntd-select/rc-select/Selector/MultipleSelector.js +184 -116
  1468. package/lib/tntd-select/rc-select/Selector/SingleSelector.js +112 -69
  1469. package/lib/tntd-select/rc-select/Selector/index.js +154 -159
  1470. package/lib/tntd-select/rc-select/TransBtn.js +45 -47
  1471. package/lib/tntd-select/rc-select/hooks/useAllowClear.js +33 -30
  1472. package/lib/tntd-select/rc-select/hooks/useBaseProps.js +15 -31
  1473. package/lib/tntd-select/rc-select/hooks/useCache.js +42 -52
  1474. package/lib/tntd-select/rc-select/hooks/useDelayReset.js +38 -44
  1475. package/lib/tntd-select/rc-select/hooks/useFilterOptions.js +63 -71
  1476. package/lib/tntd-select/rc-select/hooks/useId.js +41 -52
  1477. package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js +18 -36
  1478. package/lib/tntd-select/rc-select/hooks/useLock.js +30 -43
  1479. package/lib/tntd-select/rc-select/hooks/useOptions.js +45 -63
  1480. package/lib/tntd-select/rc-select/hooks/useRefFunc.js +15 -33
  1481. package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js +39 -54
  1482. package/lib/tntd-select/rc-select/index.js +37 -16
  1483. package/lib/tntd-select/rc-select/interface.js +4 -2
  1484. package/lib/tntd-select/rc-select/utils/commonUtil.js +30 -26
  1485. package/lib/tntd-select/rc-select/utils/keyUtil.js +13 -38
  1486. package/lib/tntd-select/rc-select/utils/legacyUtil.js +55 -57
  1487. package/lib/tntd-select/rc-select/utils/platformUtil.js +7 -6
  1488. package/lib/tntd-select/rc-select/utils/valueUtil.js +113 -90
  1489. package/lib/tntd-select/rc-select/utils/warningPropsUtil.js +114 -117
  1490. package/lib/tooltip/index.d.ts +3 -3
  1491. package/lib/tooltip/index.js +23 -22
  1492. package/lib/tooltip/index.js.map +1 -1
  1493. package/lib/tooltip/style/index.d.ts +3 -0
  1494. package/lib/tooltip/style/index.d.ts.map +1 -0
  1495. package/lib/tooltip/style/index.js +4 -0
  1496. package/lib/tooltip/style/index.js.map +1 -0
  1497. package/lib/tooltip/style/index.less +187 -0
  1498. package/lib/transfer/index.d.ts +3 -3
  1499. package/lib/transfer/index.js +23 -22
  1500. package/lib/transfer/index.js.map +1 -1
  1501. package/lib/transfer/style/customize.less +62 -0
  1502. package/lib/transfer/style/index.d.ts +7 -0
  1503. package/lib/transfer/style/index.d.ts.map +1 -0
  1504. package/lib/transfer/style/index.js +8 -0
  1505. package/lib/transfer/style/index.js.map +1 -0
  1506. package/lib/transfer/style/index.less +191 -0
  1507. package/lib/tree/index.d.ts +3 -3
  1508. package/lib/tree/index.js +23 -22
  1509. package/lib/tree/index.js.map +1 -1
  1510. package/lib/tree/style/directory.less +95 -0
  1511. package/lib/tree/style/index.d.ts +3 -0
  1512. package/lib/tree/style/index.d.ts.map +1 -0
  1513. package/lib/tree/style/index.js +4 -0
  1514. package/lib/tree/style/index.js.map +1 -0
  1515. package/lib/tree/style/index.less +280 -0
  1516. package/lib/tree/style/mixin.less +29 -0
  1517. package/lib/tree-select/index.d.ts +5 -5
  1518. package/lib/tree-select/index.js +30 -27
  1519. package/lib/tree-select/index.js.map +1 -1
  1520. package/lib/tree-select/style/index.d.ts +5 -0
  1521. package/lib/tree-select/style/index.d.ts.map +1 -0
  1522. package/lib/tree-select/style/index.js +6 -0
  1523. package/lib/tree-select/style/index.js.map +1 -0
  1524. package/lib/tree-select/style/index.less +191 -0
  1525. package/lib/typography/index.d.ts +3 -3
  1526. package/lib/typography/index.js +23 -22
  1527. package/lib/typography/index.js.map +1 -1
  1528. package/lib/typography/style/index.d.ts +5 -0
  1529. package/lib/typography/style/index.d.ts.map +1 -0
  1530. package/lib/typography/style/index.js +6 -0
  1531. package/lib/typography/style/index.js.map +1 -0
  1532. package/lib/typography/style/index.less +204 -0
  1533. package/lib/upload/index.d.ts +2 -2
  1534. package/lib/upload/index.js +32 -26
  1535. package/lib/upload/index.js.map +1 -1
  1536. package/lib/upload/style/index.d.ts +5 -0
  1537. package/lib/upload/style/index.d.ts.map +1 -0
  1538. package/lib/upload/style/index.js +6 -0
  1539. package/lib/upload/style/index.js.map +1 -0
  1540. package/lib/upload/style/index.less +542 -0
  1541. package/lib/utils/checkAuth.js +34 -23
  1542. package/lib/utils/findMenuInfoByPath.js +41 -34
  1543. package/lib/utils/index.js +151 -90
  1544. package/lib/utils/lang.d.ts.map +1 -1
  1545. package/lib/utils/lang.js +81 -120
  1546. package/lib/utils/lang.js.map +1 -1
  1547. package/lib/utils/simple-template.js +11 -7
  1548. package/lib/version/index.d.ts +3 -3
  1549. package/lib/version/index.js +23 -22
  1550. package/lib/version/index.js.map +1 -1
  1551. package/lib/version/style/index.d.ts +2 -0
  1552. package/lib/version/style/index.d.ts.map +1 -0
  1553. package/lib/version/style/index.js +3 -0
  1554. package/lib/version/style/index.js.map +1 -0
  1555. package/lib/water-mark/index.js +130 -117
  1556. package/package.json +105 -104
  1557. package/themes/default/variables.less +7 -124
  1558. package/themes/utils/colorPalette.less +0 -12
@@ -28,16 +28,13 @@
28
28
  * - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option
29
29
  * - `combobox` mode not support `optionLabelProp`
30
30
  */
31
- var __rest = (this && this.__rest) || function (s, e) {
32
- var t = {};
33
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
34
- t[p] = s[p];
35
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
36
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
37
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
38
- t[p[i]] = s[p[i]];
39
- }
40
- return t;
31
+ var __rest = this && this.__rest || function (s, e) {
32
+ var t = {};
33
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
34
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
35
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
36
+ }
37
+ return t;
41
38
  };
42
39
  import useMergedState from 'rc-util/lib/hooks/useMergedState';
43
40
  import warning from 'rc-util/lib/warning';
@@ -57,372 +54,387 @@ import { fillFieldNames, flattenOptions, injectPropsWithOption } from './utils/v
57
54
  import warningProps, { warningNullOptions } from './utils/warningPropsUtil';
58
55
  const OMIT_DOM_PROPS = ['inputValue'];
59
56
  function isRawValue(value) {
60
- return !value || typeof value !== 'object';
57
+ return !value || typeof value !== 'object';
61
58
  }
62
59
  const Select = React.forwardRef((props, ref) => {
63
- const { id, mode, prefixCls = 'rc-select', backfill, fieldNames,
64
- // Search
65
- inputValue, searchValue, onSearch, autoClearSearchValue = true,
66
- // Select
67
- onSelect, onDeselect, dropdownMatchSelectWidth = true,
68
- // Options
69
- filterOption, filterSort, optionFilterProp, optionLabelProp, options, optionRender, children, defaultActiveFirstOption, menuItemSelectedIcon, virtual, direction, listHeight = 200, listItemHeight = 20,
70
- // Value
71
- value, defaultValue, labelInValue, onChange } = props, restProps = __rest(props, ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "value", "defaultValue", "labelInValue", "onChange"]);
72
- const mergedId = useId(id);
73
- const multiple = isMultiple(mode);
74
- const childrenAsData = !!(!options && children);
75
- const mergedFilterOption = React.useMemo(() => {
76
- if (filterOption === undefined && mode === 'combobox') {
77
- return false;
60
+ const {
61
+ id,
62
+ mode,
63
+ prefixCls = 'rc-select',
64
+ backfill,
65
+ fieldNames,
66
+ // Search
67
+ inputValue,
68
+ searchValue,
69
+ onSearch,
70
+ autoClearSearchValue = true,
71
+ // Select
72
+ onSelect,
73
+ onDeselect,
74
+ dropdownMatchSelectWidth = true,
75
+ // Options
76
+ filterOption,
77
+ filterSort,
78
+ optionFilterProp,
79
+ optionLabelProp,
80
+ options,
81
+ optionRender,
82
+ children,
83
+ defaultActiveFirstOption,
84
+ menuItemSelectedIcon,
85
+ virtual,
86
+ direction,
87
+ listHeight = 200,
88
+ listItemHeight = 20,
89
+ // Value
90
+ value,
91
+ defaultValue,
92
+ labelInValue,
93
+ onChange
94
+ } = props,
95
+ restProps = __rest(props, ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "value", "defaultValue", "labelInValue", "onChange"]);
96
+ const mergedId = useId(id);
97
+ const multiple = isMultiple(mode);
98
+ const childrenAsData = !!(!options && children);
99
+ const mergedFilterOption = React.useMemo(() => {
100
+ if (filterOption === undefined && mode === 'combobox') {
101
+ return false;
102
+ }
103
+ return filterOption;
104
+ }, [filterOption, mode]);
105
+ // ========================= FieldNames =========================
106
+ const mergedFieldNames = React.useMemo(() => fillFieldNames(fieldNames, childrenAsData), /* eslint-disable react-hooks/exhaustive-deps */
107
+ [
108
+ // We stringify fieldNames to avoid unnecessary re-renders.
109
+ JSON.stringify(fieldNames), childrenAsData]);
110
+ // =========================== Search ===========================
111
+ const [mergedSearchValue, setSearchValue] = useMergedState('', {
112
+ value: searchValue !== undefined ? searchValue : inputValue,
113
+ postState: search => search || ''
114
+ });
115
+ // =========================== Option ===========================
116
+ const parsedOptions = useOptions(options, children, mergedFieldNames, optionFilterProp, optionLabelProp);
117
+ const {
118
+ valueOptions,
119
+ labelOptions,
120
+ options: mergedOptions
121
+ } = parsedOptions;
122
+ // ========================= Wrap Value =========================
123
+ const convert2LabelValues = React.useCallback(draftValues => {
124
+ // Convert to array
125
+ const valueList = toArray(draftValues);
126
+ // Convert to labelInValue type
127
+ return valueList.map(val => {
128
+ var _a, _b;
129
+ let rawValue;
130
+ let rawLabel;
131
+ let rawKey;
132
+ let rawDisabled;
133
+ let rawTitle;
134
+ // Fill label & value
135
+ if (isRawValue(val)) {
136
+ rawValue = val;
137
+ } else {
138
+ rawKey = val.key;
139
+ rawLabel = val.label;
140
+ rawValue = (_a = val.value) !== null && _a !== void 0 ? _a : rawKey;
141
+ }
142
+ const option = valueOptions.get(rawValue);
143
+ if (option) {
144
+ // Fill missing props
145
+ if (rawLabel === undefined) rawLabel = option === null || option === void 0 ? void 0 : option[optionLabelProp || mergedFieldNames.label];
146
+ if (rawKey === undefined) rawKey = (_b = option === null || option === void 0 ? void 0 : option.key) !== null && _b !== void 0 ? _b : rawValue;
147
+ rawDisabled = option === null || option === void 0 ? void 0 : option.disabled;
148
+ rawTitle = option === null || option === void 0 ? void 0 : option.title;
149
+ // Warning if label not same as provided
150
+ if (process.env.NODE_ENV !== 'production' && !optionLabelProp) {
151
+ const optionLabel = option === null || option === void 0 ? void 0 : option[mergedFieldNames.label];
152
+ if (optionLabel !== undefined && !React.isValidElement(optionLabel) && !React.isValidElement(rawLabel) && optionLabel !== rawLabel) {
153
+ warning(false, '`label` of `value` is not same as `label` in Select options.');
154
+ }
78
155
  }
79
- return filterOption;
80
- }, [filterOption, mode]);
81
- // ========================= FieldNames =========================
82
- const mergedFieldNames = React.useMemo(() => fillFieldNames(fieldNames, childrenAsData),
83
- /* eslint-disable react-hooks/exhaustive-deps */
84
- [
85
- // We stringify fieldNames to avoid unnecessary re-renders.
86
- JSON.stringify(fieldNames),
87
- childrenAsData,
88
- ]);
89
- // =========================== Search ===========================
90
- const [mergedSearchValue, setSearchValue] = useMergedState('', {
91
- value: searchValue !== undefined ? searchValue : inputValue,
92
- postState: (search) => search || '',
93
- });
94
- // =========================== Option ===========================
95
- const parsedOptions = useOptions(options, children, mergedFieldNames, optionFilterProp, optionLabelProp);
96
- const { valueOptions, labelOptions, options: mergedOptions } = parsedOptions;
97
- // ========================= Wrap Value =========================
98
- const convert2LabelValues = React.useCallback((draftValues) => {
99
- // Convert to array
100
- const valueList = toArray(draftValues);
101
- // Convert to labelInValue type
102
- return valueList.map((val) => {
103
- var _a, _b;
104
- let rawValue;
105
- let rawLabel;
106
- let rawKey;
107
- let rawDisabled;
108
- let rawTitle;
109
- // Fill label & value
110
- if (isRawValue(val)) {
111
- rawValue = val;
112
- }
113
- else {
114
- rawKey = val.key;
115
- rawLabel = val.label;
116
- rawValue = (_a = val.value) !== null && _a !== void 0 ? _a : rawKey;
117
- }
118
- const option = valueOptions.get(rawValue);
119
- if (option) {
120
- // Fill missing props
121
- if (rawLabel === undefined)
122
- rawLabel = option === null || option === void 0 ? void 0 : option[optionLabelProp || mergedFieldNames.label];
123
- if (rawKey === undefined)
124
- rawKey = (_b = option === null || option === void 0 ? void 0 : option.key) !== null && _b !== void 0 ? _b : rawValue;
125
- rawDisabled = option === null || option === void 0 ? void 0 : option.disabled;
126
- rawTitle = option === null || option === void 0 ? void 0 : option.title;
127
- // Warning if label not same as provided
128
- if (process.env.NODE_ENV !== 'production' && !optionLabelProp) {
129
- const optionLabel = option === null || option === void 0 ? void 0 : option[mergedFieldNames.label];
130
- if (optionLabel !== undefined &&
131
- !React.isValidElement(optionLabel) &&
132
- !React.isValidElement(rawLabel) &&
133
- optionLabel !== rawLabel) {
134
- warning(false, '`label` of `value` is not same as `label` in Select options.');
135
- }
136
- }
137
- }
138
- return {
139
- label: rawLabel,
140
- value: rawValue,
141
- key: rawKey,
142
- disabled: rawDisabled,
143
- title: rawTitle,
144
- };
145
- });
146
- }, [mergedFieldNames, optionLabelProp, valueOptions]);
147
- // =========================== Values ===========================
148
- const [internalValue, setInternalValue] = useMergedState(defaultValue, {
149
- value,
156
+ }
157
+ return {
158
+ label: rawLabel,
159
+ value: rawValue,
160
+ key: rawKey,
161
+ disabled: rawDisabled,
162
+ title: rawTitle
163
+ };
150
164
  });
151
- // Merged value with LabelValueType
152
- const rawLabeledValues = React.useMemo(() => {
153
- var _a;
154
- const values = convert2LabelValues(internalValue);
155
- // combobox no need save value when it's no value (exclude value equal 0)
156
- if (mode === 'combobox' && isComboNoValue((_a = values[0]) === null || _a === void 0 ? void 0 : _a.value)) {
157
- return [];
158
- }
159
- return values;
160
- }, [internalValue, convert2LabelValues, mode]);
161
- // Fill label with cache to avoid option remove
162
- const [mergedValues, getMixedOption] = useCache(rawLabeledValues, valueOptions);
163
- const displayValues = React.useMemo(() => {
164
- // `null` need show as placeholder instead
165
- // https://github.com/ant-design/ant-design/issues/25057
166
- if (!mode && mergedValues.length === 1) {
167
- const firstValue = mergedValues[0];
168
- if (firstValue.value === null &&
169
- (firstValue.label === null || firstValue.label === undefined)) {
170
- return [];
171
- }
172
- }
173
- return mergedValues.map((item) => {
174
- var _a;
175
- return (Object.assign(Object.assign({}, item), { label: (_a = item.label) !== null && _a !== void 0 ? _a : item.value }));
176
- });
177
- }, [mode, mergedValues]);
178
- /** Convert `displayValues` to raw value type set */
179
- const rawValues = React.useMemo(() => new Set(mergedValues.map((val) => val.value)), [mergedValues]);
180
- React.useEffect(() => {
181
- var _a;
182
- if (mode === 'combobox') {
183
- const strValue = (_a = mergedValues[0]) === null || _a === void 0 ? void 0 : _a.value;
184
- setSearchValue(hasValue(strValue) ? String(strValue) : '');
185
- }
186
- }, [mergedValues]);
187
- // ======================= Display Option =======================
188
- // Create a placeholder item if not exist in `options`
189
- const createTagOption = useRefFunc((val, label) => {
190
- const mergedLabel = label !== null && label !== void 0 ? label : val;
191
- return {
192
- [mergedFieldNames.value]: val,
193
- [mergedFieldNames.label]: mergedLabel,
194
- };
165
+ }, [mergedFieldNames, optionLabelProp, valueOptions]);
166
+ // =========================== Values ===========================
167
+ const [internalValue, setInternalValue] = useMergedState(defaultValue, {
168
+ value
169
+ });
170
+ // Merged value with LabelValueType
171
+ const rawLabeledValues = React.useMemo(() => {
172
+ var _a;
173
+ const values = convert2LabelValues(internalValue);
174
+ // combobox no need save value when it's no value (exclude value equal 0)
175
+ if (mode === 'combobox' && isComboNoValue((_a = values[0]) === null || _a === void 0 ? void 0 : _a.value)) {
176
+ return [];
177
+ }
178
+ return values;
179
+ }, [internalValue, convert2LabelValues, mode]);
180
+ // Fill label with cache to avoid option remove
181
+ const [mergedValues, getMixedOption] = useCache(rawLabeledValues, valueOptions);
182
+ const displayValues = React.useMemo(() => {
183
+ // `null` need show as placeholder instead
184
+ // https://github.com/ant-design/ant-design/issues/25057
185
+ if (!mode && mergedValues.length === 1) {
186
+ const firstValue = mergedValues[0];
187
+ if (firstValue.value === null && (firstValue.label === null || firstValue.label === undefined)) {
188
+ return [];
189
+ }
190
+ }
191
+ return mergedValues.map(item => {
192
+ var _a;
193
+ return Object.assign(Object.assign({}, item), {
194
+ label: (_a = item.label) !== null && _a !== void 0 ? _a : item.value
195
+ });
195
196
  });
196
- // Fill tag as option if mode is `tags`
197
- const filledTagOptions = React.useMemo(() => {
198
- if (mode !== 'tags') {
199
- return mergedOptions;
200
- }
201
- // >>> Tag mode
202
- const cloneOptions = [...mergedOptions];
203
- // Check if value exist in options (include new patch item)
204
- const existOptions = (val) => valueOptions.has(val);
205
- // Fill current value as option
206
- [...mergedValues]
207
- .sort((a, b) => (a.value < b.value ? -1 : 1))
208
- .forEach((item) => {
209
- const val = item.value;
210
- if (!existOptions(val)) {
211
- cloneOptions.push(createTagOption(val, item.label));
212
- }
213
- });
214
- return cloneOptions;
215
- }, [createTagOption, mergedOptions, valueOptions, mergedValues, mode]);
216
- const filteredOptions = useFilterOptions(filledTagOptions, mergedFieldNames, mergedSearchValue, mergedFilterOption, optionFilterProp);
217
- // Fill options with search value if needed
218
- const filledSearchOptions = React.useMemo(() => {
219
- if (mode !== 'tags' ||
220
- !mergedSearchValue ||
221
- filteredOptions.some((item) => item[optionFilterProp || 'value'] === mergedSearchValue)) {
222
- return filteredOptions;
223
- }
224
- // ignore when search value equal select input value
225
- if (filteredOptions.some((item) => item[mergedFieldNames.value] === mergedSearchValue)) {
226
- return filteredOptions;
227
- }
228
- // Fill search value as option
229
- return [createTagOption(mergedSearchValue), ...filteredOptions];
230
- }, [
231
- createTagOption,
232
- optionFilterProp,
233
- mode,
234
- filteredOptions,
235
- mergedSearchValue,
236
- mergedFieldNames,
237
- ]);
238
- const orderedFilteredOptions = React.useMemo(() => {
239
- if (!filterSort) {
240
- return filledSearchOptions;
241
- }
242
- return [...filledSearchOptions].sort((a, b) => filterSort(a, b));
243
- }, [filledSearchOptions, filterSort]);
244
- const displayOptions = React.useMemo(() => flattenOptions(orderedFilteredOptions, {
245
- fieldNames: mergedFieldNames,
246
- childrenAsData,
247
- }), [orderedFilteredOptions, mergedFieldNames, childrenAsData]);
248
- // =========================== Change ===========================
249
- const triggerChange = (values) => {
250
- const labeledValues = convert2LabelValues(values);
251
- setInternalValue(labeledValues);
252
- if (onChange &&
253
- // Trigger event only when value changed
254
- (labeledValues.length !== mergedValues.length ||
255
- labeledValues.some((newVal, index) => { var _a; return ((_a = mergedValues[index]) === null || _a === void 0 ? void 0 : _a.value) !== (newVal === null || newVal === void 0 ? void 0 : newVal.value); }))) {
256
- const returnValues = labelInValue ? labeledValues : labeledValues.map((v) => v.value);
257
- const returnOptions = labeledValues.map((v) => injectPropsWithOption(getMixedOption(v.value)));
258
- onChange(
259
- // Value
260
- multiple ? returnValues : returnValues[0],
261
- // Option
262
- multiple ? returnOptions : returnOptions[0]);
263
- }
264
- };
265
- // ======================= Accessibility ========================
266
- const [activeValue, setActiveValue] = React.useState(null);
267
- const [accessibilityIndex, setAccessibilityIndex] = React.useState(0);
268
- const mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';
269
- const onActiveValue = React.useCallback((active, index, { source = 'keyboard' } = {}) => {
270
- setAccessibilityIndex(index);
271
- if (backfill && mode === 'combobox' && active !== null && source === 'keyboard') {
272
- setActiveValue(String(active));
273
- }
274
- }, [backfill, mode]);
275
- // ========================= OptionList =========================
276
- const triggerSelect = (val, selected, type) => {
277
- const getSelectEnt = () => {
278
- var _a;
279
- const option = getMixedOption(val);
280
- return [
281
- labelInValue
282
- ? {
283
- label: option === null || option === void 0 ? void 0 : option[mergedFieldNames.label],
284
- value: val,
285
- key: (_a = option === null || option === void 0 ? void 0 : option.key) !== null && _a !== void 0 ? _a : val,
286
- }
287
- : val,
288
- injectPropsWithOption(option),
289
- ];
290
- };
291
- if (selected && onSelect) {
292
- const [wrappedValue, option] = getSelectEnt();
293
- onSelect(wrappedValue, option);
294
- }
295
- else if (!selected && onDeselect && type !== 'clear') {
296
- const [wrappedValue, option] = getSelectEnt();
297
- onDeselect(wrappedValue, option);
298
- }
197
+ }, [mode, mergedValues]);
198
+ /** Convert `displayValues` to raw value type set */
199
+ const rawValues = React.useMemo(() => new Set(mergedValues.map(val => val.value)), [mergedValues]);
200
+ React.useEffect(() => {
201
+ var _a;
202
+ if (mode === 'combobox') {
203
+ const strValue = (_a = mergedValues[0]) === null || _a === void 0 ? void 0 : _a.value;
204
+ setSearchValue(hasValue(strValue) ? String(strValue) : '');
205
+ }
206
+ }, [mergedValues]);
207
+ // ======================= Display Option =======================
208
+ // Create a placeholder item if not exist in `options`
209
+ const createTagOption = useRefFunc((val, label) => {
210
+ const mergedLabel = label !== null && label !== void 0 ? label : val;
211
+ return {
212
+ [mergedFieldNames.value]: val,
213
+ [mergedFieldNames.label]: mergedLabel
299
214
  };
300
- // Used for OptionList selection
301
- const onInternalSelect = useRefFunc((val, info) => {
302
- let cloneValues;
303
- // Single mode always trigger select only with option list
304
- const mergedSelect = multiple ? info.selected : true;
305
- if (mergedSelect) {
306
- cloneValues = multiple ? [...mergedValues, val] : [val];
307
- }
308
- else {
309
- cloneValues = mergedValues.filter((v) => v.value !== val);
310
- }
311
- triggerChange(cloneValues);
312
- triggerSelect(val, mergedSelect);
313
- // Clean search value if single or configured
314
- if (mode === 'combobox') {
315
- // setSearchValue(String(val));
316
- setActiveValue('');
317
- }
318
- else if (!isMultiple || autoClearSearchValue) {
319
- setSearchValue('');
320
- setActiveValue('');
321
- }
215
+ });
216
+ // Fill tag as option if mode is `tags`
217
+ const filledTagOptions = React.useMemo(() => {
218
+ if (mode !== 'tags') {
219
+ return mergedOptions;
220
+ }
221
+ // >>> Tag mode
222
+ const cloneOptions = [...mergedOptions];
223
+ // Check if value exist in options (include new patch item)
224
+ const existOptions = val => valueOptions.has(val);
225
+ // Fill current value as option
226
+ [...mergedValues].sort((a, b) => a.value < b.value ? -1 : 1).forEach(item => {
227
+ const val = item.value;
228
+ if (!existOptions(val)) {
229
+ cloneOptions.push(createTagOption(val, item.label));
230
+ }
322
231
  });
323
- // ======================= Display Change =======================
324
- // BaseSelect display values change
325
- const onDisplayValuesChange = (nextValues, info) => {
326
- triggerChange(nextValues);
327
- const { type, values } = info;
328
- if (type === 'remove' || type === 'clear') {
329
- values.forEach((item) => {
330
- triggerSelect(item.value, false, type);
331
- });
332
- }
333
- };
334
- // =========================== Search ===========================
335
- const onInternalSearch = (searchText, info) => {
336
- setSearchValue(searchText);
337
- setActiveValue(null);
338
- // [Submit] Tag mode should flush input
339
- if (info.source === 'submit') {
340
- const formatted = (searchText || '').trim();
341
- // prevent empty tags from appearing when you click the Enter button
342
- if (formatted) {
343
- const newRawValues = Array.from(new Set([...rawValues, formatted]));
344
- triggerChange(newRawValues);
345
- triggerSelect(formatted, true);
346
- setSearchValue('');
347
- }
348
- return;
349
- }
350
- if (info.source !== 'blur') {
351
- if (mode === 'combobox') {
352
- triggerChange(searchText);
353
- }
354
- onSearch === null || onSearch === void 0 ? void 0 : onSearch(searchText);
355
- }
232
+ return cloneOptions;
233
+ }, [createTagOption, mergedOptions, valueOptions, mergedValues, mode]);
234
+ const filteredOptions = useFilterOptions(filledTagOptions, mergedFieldNames, mergedSearchValue, mergedFilterOption, optionFilterProp);
235
+ // Fill options with search value if needed
236
+ const filledSearchOptions = React.useMemo(() => {
237
+ if (mode !== 'tags' || !mergedSearchValue || filteredOptions.some(item => item[optionFilterProp || 'value'] === mergedSearchValue)) {
238
+ return filteredOptions;
239
+ }
240
+ // ignore when search value equal select input value
241
+ if (filteredOptions.some(item => item[mergedFieldNames.value] === mergedSearchValue)) {
242
+ return filteredOptions;
243
+ }
244
+ // Fill search value as option
245
+ return [createTagOption(mergedSearchValue), ...filteredOptions];
246
+ }, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue, mergedFieldNames]);
247
+ const orderedFilteredOptions = React.useMemo(() => {
248
+ if (!filterSort) {
249
+ return filledSearchOptions;
250
+ }
251
+ return [...filledSearchOptions].sort((a, b) => filterSort(a, b));
252
+ }, [filledSearchOptions, filterSort]);
253
+ const displayOptions = React.useMemo(() => flattenOptions(orderedFilteredOptions, {
254
+ fieldNames: mergedFieldNames,
255
+ childrenAsData
256
+ }), [orderedFilteredOptions, mergedFieldNames, childrenAsData]);
257
+ // =========================== Change ===========================
258
+ const triggerChange = values => {
259
+ const labeledValues = convert2LabelValues(values);
260
+ setInternalValue(labeledValues);
261
+ if (onChange && (
262
+ // Trigger event only when value changed
263
+ labeledValues.length !== mergedValues.length || labeledValues.some((newVal, index) => {
264
+ var _a;
265
+ return ((_a = mergedValues[index]) === null || _a === void 0 ? void 0 : _a.value) !== (newVal === null || newVal === void 0 ? void 0 : newVal.value);
266
+ }))) {
267
+ const returnValues = labelInValue ? labeledValues : labeledValues.map(v => v.value);
268
+ const returnOptions = labeledValues.map(v => injectPropsWithOption(getMixedOption(v.value)));
269
+ onChange(
270
+ // Value
271
+ multiple ? returnValues : returnValues[0],
272
+ // Option
273
+ multiple ? returnOptions : returnOptions[0]);
274
+ }
275
+ };
276
+ // ======================= Accessibility ========================
277
+ const [activeValue, setActiveValue] = React.useState(null);
278
+ const [accessibilityIndex, setAccessibilityIndex] = React.useState(0);
279
+ const mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';
280
+ const onActiveValue = React.useCallback((active, index, {
281
+ source = 'keyboard'
282
+ } = {}) => {
283
+ setAccessibilityIndex(index);
284
+ if (backfill && mode === 'combobox' && active !== null && source === 'keyboard') {
285
+ setActiveValue(String(active));
286
+ }
287
+ }, [backfill, mode]);
288
+ // ========================= OptionList =========================
289
+ const triggerSelect = (val, selected, type) => {
290
+ const getSelectEnt = () => {
291
+ var _a;
292
+ const option = getMixedOption(val);
293
+ return [labelInValue ? {
294
+ label: option === null || option === void 0 ? void 0 : option[mergedFieldNames.label],
295
+ value: val,
296
+ key: (_a = option === null || option === void 0 ? void 0 : option.key) !== null && _a !== void 0 ? _a : val
297
+ } : val, injectPropsWithOption(option)];
356
298
  };
357
- const onInternalSearchSplit = (words) => {
358
- let patchValues = words;
359
- if (mode !== 'tags') {
360
- patchValues = words
361
- .map((word) => {
362
- const opt = labelOptions.get(word);
363
- return opt === null || opt === void 0 ? void 0 : opt.value;
364
- })
365
- .filter((val) => val !== undefined);
366
- }
367
- const newRawValues = Array.from(new Set([...rawValues, ...patchValues]));
299
+ if (selected && onSelect) {
300
+ const [wrappedValue, option] = getSelectEnt();
301
+ onSelect(wrappedValue, option);
302
+ } else if (!selected && onDeselect && type !== 'clear') {
303
+ const [wrappedValue, option] = getSelectEnt();
304
+ onDeselect(wrappedValue, option);
305
+ }
306
+ };
307
+ // Used for OptionList selection
308
+ const onInternalSelect = useRefFunc((val, info) => {
309
+ let cloneValues;
310
+ // Single mode always trigger select only with option list
311
+ const mergedSelect = multiple ? info.selected : true;
312
+ if (mergedSelect) {
313
+ cloneValues = multiple ? [...mergedValues, val] : [val];
314
+ } else {
315
+ cloneValues = mergedValues.filter(v => v.value !== val);
316
+ }
317
+ triggerChange(cloneValues);
318
+ triggerSelect(val, mergedSelect);
319
+ // Clean search value if single or configured
320
+ if (mode === 'combobox') {
321
+ // setSearchValue(String(val));
322
+ setActiveValue('');
323
+ } else if (!isMultiple || autoClearSearchValue) {
324
+ setSearchValue('');
325
+ setActiveValue('');
326
+ }
327
+ });
328
+ // ======================= Display Change =======================
329
+ // BaseSelect display values change
330
+ const onDisplayValuesChange = (nextValues, info) => {
331
+ triggerChange(nextValues);
332
+ const {
333
+ type,
334
+ values
335
+ } = info;
336
+ if (type === 'remove' || type === 'clear') {
337
+ values.forEach(item => {
338
+ triggerSelect(item.value, false, type);
339
+ });
340
+ }
341
+ };
342
+ // =========================== Search ===========================
343
+ const onInternalSearch = (searchText, info) => {
344
+ setSearchValue(searchText);
345
+ setActiveValue(null);
346
+ // [Submit] Tag mode should flush input
347
+ if (info.source === 'submit') {
348
+ const formatted = (searchText || '').trim();
349
+ // prevent empty tags from appearing when you click the Enter button
350
+ if (formatted) {
351
+ const newRawValues = Array.from(new Set([...rawValues, formatted]));
368
352
  triggerChange(newRawValues);
369
- newRawValues.forEach((newRawValue) => {
370
- triggerSelect(newRawValue, true);
371
- });
372
- };
373
- // ========================== Context ===========================
374
- const selectContext = React.useMemo(() => {
375
- const realVirtual = virtual !== false && dropdownMatchSelectWidth !== false;
376
- return Object.assign(Object.assign({}, parsedOptions), { flattenOptions: displayOptions, onActiveValue, defaultActiveFirstOption: mergedDefaultActiveFirstOption, onSelect: onInternalSelect, menuItemSelectedIcon,
377
- rawValues, fieldNames: mergedFieldNames, virtual: realVirtual, direction,
378
- listHeight,
379
- listItemHeight,
380
- childrenAsData,
381
- optionRender });
382
- }, [
383
- parsedOptions,
384
- displayOptions,
385
- onActiveValue,
386
- mergedDefaultActiveFirstOption,
387
- onInternalSelect,
388
- menuItemSelectedIcon,
389
- rawValues,
390
- mergedFieldNames,
391
- virtual,
392
- dropdownMatchSelectWidth,
393
- listHeight,
394
- listItemHeight,
395
- childrenAsData,
396
- optionRender,
397
- ]);
398
- // ========================== Warning ===========================
399
- if (process.env.NODE_ENV !== 'production') {
400
- warningProps(props);
401
- warningNullOptions(mergedOptions, mergedFieldNames);
353
+ triggerSelect(formatted, true);
354
+ setSearchValue('');
355
+ }
356
+ return;
357
+ }
358
+ if (info.source !== 'blur') {
359
+ if (mode === 'combobox') {
360
+ triggerChange(searchText);
361
+ }
362
+ onSearch === null || onSearch === void 0 ? void 0 : onSearch(searchText);
363
+ }
364
+ };
365
+ const onInternalSearchSplit = words => {
366
+ let patchValues = words;
367
+ if (mode !== 'tags') {
368
+ patchValues = words.map(word => {
369
+ const opt = labelOptions.get(word);
370
+ return opt === null || opt === void 0 ? void 0 : opt.value;
371
+ }).filter(val => val !== undefined);
402
372
  }
403
- // ==============================================================
404
- // == Render ==
405
- // ==============================================================
406
- return (React.createElement(SelectContext.Provider, { value: selectContext },
407
- React.createElement(BaseSelect, Object.assign({}, restProps, {
408
- // >>> MISC
409
- id: mergedId, prefixCls: prefixCls, ref: ref, omitDomProps: OMIT_DOM_PROPS, mode: mode,
410
- // >>> Values
411
- displayValues: displayValues, onDisplayValuesChange: onDisplayValuesChange,
412
- // >>> Trigger
413
- direction: direction,
414
- // >>> Search
415
- searchValue: mergedSearchValue, onSearch: onInternalSearch, autoClearSearchValue: autoClearSearchValue, onSearchSplit: onInternalSearchSplit, dropdownMatchSelectWidth: dropdownMatchSelectWidth,
416
- // >>> OptionList
417
- OptionList: OptionList, emptyOptions: !displayOptions.length,
418
- // >>> Accessibility
419
- activeValue: activeValue, activeDescendantId: `${mergedId}_list_${accessibilityIndex}` }))));
373
+ const newRawValues = Array.from(new Set([...rawValues, ...patchValues]));
374
+ triggerChange(newRawValues);
375
+ newRawValues.forEach(newRawValue => {
376
+ triggerSelect(newRawValue, true);
377
+ });
378
+ };
379
+ // ========================== Context ===========================
380
+ const selectContext = React.useMemo(() => {
381
+ const realVirtual = virtual !== false && dropdownMatchSelectWidth !== false;
382
+ return Object.assign(Object.assign({}, parsedOptions), {
383
+ flattenOptions: displayOptions,
384
+ onActiveValue,
385
+ defaultActiveFirstOption: mergedDefaultActiveFirstOption,
386
+ onSelect: onInternalSelect,
387
+ menuItemSelectedIcon,
388
+ rawValues,
389
+ fieldNames: mergedFieldNames,
390
+ virtual: realVirtual,
391
+ direction,
392
+ listHeight,
393
+ listItemHeight,
394
+ childrenAsData,
395
+ optionRender
396
+ });
397
+ }, [parsedOptions, displayOptions, onActiveValue, mergedDefaultActiveFirstOption, onInternalSelect, menuItemSelectedIcon, rawValues, mergedFieldNames, virtual, dropdownMatchSelectWidth, listHeight, listItemHeight, childrenAsData, optionRender]);
398
+ // ========================== Warning ===========================
399
+ if (process.env.NODE_ENV !== 'production') {
400
+ warningProps(props);
401
+ warningNullOptions(mergedOptions, mergedFieldNames);
402
+ }
403
+ // ==============================================================
404
+ // == Render ==
405
+ // ==============================================================
406
+ return React.createElement(SelectContext.Provider, {
407
+ value: selectContext
408
+ }, React.createElement(BaseSelect, Object.assign({}, restProps, {
409
+ // >>> MISC
410
+ id: mergedId,
411
+ prefixCls: prefixCls,
412
+ ref: ref,
413
+ omitDomProps: OMIT_DOM_PROPS,
414
+ mode: mode,
415
+ // >>> Values
416
+ displayValues: displayValues,
417
+ onDisplayValuesChange: onDisplayValuesChange,
418
+ // >>> Trigger
419
+ direction: direction,
420
+ // >>> Search
421
+ searchValue: mergedSearchValue,
422
+ onSearch: onInternalSearch,
423
+ autoClearSearchValue: autoClearSearchValue,
424
+ onSearchSplit: onInternalSearchSplit,
425
+ dropdownMatchSelectWidth: dropdownMatchSelectWidth,
426
+ // >>> OptionList
427
+ OptionList: OptionList,
428
+ emptyOptions: !displayOptions.length,
429
+ // >>> Accessibility
430
+ activeValue: activeValue,
431
+ activeDescendantId: `${mergedId}_list_${accessibilityIndex}`
432
+ })));
420
433
  });
421
434
  if (process.env.NODE_ENV !== 'production') {
422
- Select.displayName = 'Select';
435
+ Select.displayName = 'Select';
423
436
  }
424
437
  const TypedSelect = Select;
425
438
  TypedSelect.Option = Option;
426
439
  TypedSelect.OptGroup = OptGroup;
427
- export default TypedSelect;
428
- //# sourceMappingURL=Select.js.map
440
+ export default TypedSelect;