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
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/handle/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AACvC,4FAAmE;AACnE,6DAA+B;AAC/B,wCAA0C;AAC1C,yDAAgC;AAChC,2DAAkC;AAClC,mDAA0B;AAC1B,wBAAqB;AAErB,MAAM,SAAS,GAAG,iBAAiB,CAAA;AAGnC,kBAAe,CAAC,KAAK,EAAE,EAAE;IACvB,OAAO,CACL,8BAAC,wBAAc,IAAC,aAAa,EAAC,QAAQ,IACnC,CAAC,MAAM,EAAE,U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AClB,CACF,CACL,CACQ,CACZ,CACG,CACP,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA","sourcesContent":["import React, { Fragment } from 'react'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport Icon from '../tntd-icon'\nimport {doUpperTitle} from \"../utils/lang\"\nimport Divider from '../divider'\nimport Dropdown from '../dropdown'\nimport Menu from '../menu'\nimport './index.less'\n\nconst clsPrefix = 'tntd-more-menus'\n\n\nexport default (props) => {\n return (\n <LocaleReceiver componentName=\"Handle\">\n {(locale, localeCode) => {\n const {\n children = [],\n type,\n num = 3,\n lang,\n divider = true,\n lessOneMoreFit,\n popConfirmHandle,\n isIconBtn,\n stopPropagation=true,\n upperCaseIgnore=[],\n unUpperConverted=false,\n ...rest\n } = props || {}\n\n // 非中文\n let isCn = lang === 'cn'\n if (!lang) {\n isCn = localeCode === 'zh-cn'\n }\n\n\n\n let newChildren = []\n if (Array.isArray(children)) {\n newChildren = children?.filter((item) => !!item) || []\n } else if (children) {\n newChildren.push(children)\n }\n\n\n // 非中文 且非 icon图标\n if(!unUpperConverted && !isCn && !isIconBtn ){\n newChildren?.forEach((v,i)=>{\n newChildren[i] = React.cloneElement(v, {\n ...(v?.props || {}),\n children: doUpperTitle(v.props.children, upperCaseIgnore)\n })\n })\n }\n\n // 子元素大于1个,且不是 icon元素\n const specialSceneDefaultShow = newChildren?.length > 1 && !isIconBtn\n\n if (specialSceneDefaultShow && (!isCn || popConfirmHandle)) {\n newChildren?.forEach((v, i) => {\n const { type, props } = v\n if (\n type?.name === 'Popconfirm' ||\n (props.hasOwnProperty('onConfirm') && typeof props?.onConfirm === 'function')\n ) {\n let placement = {}\n if (\n !isCn ||\n (num &&\n !isNaN(num) &&\n i + 1 > num &&\n !(lessOneMoreFit && newChildren.length - num === 1))\n ) {\n placement = {\n placement: 'left',\n }\n }\n newChildren[i] = React.cloneElement(v, {\n overlayStyle: { width: 180 },\n ...(v?.props || {}),\n onClick: (e) => e.stopPropagation(),\n ...placement,\n trigger: 'hover',\n getPopupContainer: (trigger) => trigger.parentNode,\n })\n }\n })\n }\n\n let [preChildPart, lastChildPart] = [newChildren, null]\n\n // 只有1个时不适配\n if (lessOneMoreFit && newChildren.length - num === 1) {\n preChildPart = newChildren\n } else if (newChildren && num && !isNaN(num) && newChildren.length > num) {\n preChildPart = newChildren.slice(0, num)\n lastChildPart = newChildren.slice(num)\n }\n\n if (divider && preChildPart) {\n const preChildLen = preChildPart.length\n preChildPart = preChildPart.map((dom, i) => (\n <Fragment key={i}>\n {dom}\n {!(\n (i === preChildLen - 1 && !lastChildPart?.length) // 没有更多 且 是最后一个时 不显示 Divider\n ) && <Divider type=\"vertical\" />}\n </Fragment>\n ))\n }\n const menu = (childArr)=>(\n <Menu className=\"org-pop-opera-btn\">\n {\n childArr?.map(\n (child,i) => (\n <Menu.Item key={i}>\n {child}\n </Menu.Item>\n )\n )\n }\n </Menu>\n );\n\n\n if(!isCn && specialSceneDefaultShow ){\n return (\n <Dropdown overlay={menu(newChildren||[])} arrow onClick={(e)=>{\n if(stopPropagation){\n e.stopPropagation()\n }\n }}>\n {\n type === 'icon' ?\n <Icon type=\"more\" /> :\n <a className=\"ant-dropdown-more\">\n {locale?.more}\n <i className={`${clsPrefix}-dropdown-icon`}>\n <Icon type=\"down\" />\n </i>\n </a>\n }\n </Dropdown>\n );\n }\n\n return (\n <div\n onClick={(e) => {\n if(stopPropagation){\n e.stopPropagation()\n }\n }}\n {...rest}\n >\n {preChildPart}\n {!!lastChildPart?.length && (\n <Dropdown overlay={menu(lastChildPart || [])} arrow>\n {type === 'icon' ? (\n <Icon type=\"more\" />\n ) : (\n <a className=\"ant-dropdown-more\">\n {locale?.more}\n <i className={`${clsPrefix}-dropdown-icon`}>\n <Icon type=\"down\" />\n </i>\n </a>\n )}\n </Dropdown>\n )}\n </div>\n )\n }}\n </LocaleReceiver>\n )\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/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IAAI,CAAC,aAAa,IAAI,EAAE,CAAC,EAAE,KAAK,UAChD,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CACjB,8BAAC,mBAAI,IAAC,IAAI,EAAC,MAAM,GAAG,CACrB,CAAC,CAAC,CAAC,CACF,qCAAG,SAAS,EAAC,mBAAmB,IAC7B,MAAM,aAAN,MAAM;gBAAN,MAAM,CAAE,IAAI;gBACb,qCAAG,SAAS,EAAE,GAAG,SAAS,gBAAgB;oBACxC,8BAAC,mBAAI,IAAC,IAAI,EAAC,MAAM,GAAG,CAClB,CACF,CACL,CACQ,CACZ,CACG,CACP,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA","sourcesContent":["import React, { Fragment } from 'react'\nimport LocaleReceiver from 'antd/lib/locale-provider/LocaleReceiver'\nimport Icon from '../tntd-icon'\nimport {doUpperTitle} from \"../utils/lang\"\nimport Divider from '../divider'\nimport Dropdown from '../dropdown'\nimport Menu from '../menu'\nimport './index.less'\n\nconst clsPrefix = 'tntd-more-menus'\n\n\nexport default (props) => {\n return (\n <LocaleReceiver componentName=\"Handle\">\n {(locale, localeCode) => {\n const {\n children = [],\n type,\n num = 3,\n lang,\n divider = true,\n lessOneMoreFit,\n popConfirmHandle,\n isIconBtn,\n stopPropagation=true,\n upperCaseIgnore=[],\n unUpperConverted=false,\n ...rest\n } = props || {}\n\n // 非中文\n let isCn = lang === 'cn'\n if (!lang) {\n isCn = localeCode === 'zh-cn'\n }\n\n\n\n let newChildren = []\n if (Array.isArray(children)) {\n newChildren = children?.filter((item) => !!item) || []\n } else if (children) {\n newChildren.push(children)\n }\n\n\n // 非中文 且非 icon图标\n if(!unUpperConverted && !isCn && !isIconBtn ){\n newChildren?.forEach((v,i)=>{\n newChildren[i] = React.cloneElement(v, {\n ...(v?.props || {}),\n children: doUpperTitle(v.props.children, upperCaseIgnore)\n })\n })\n }\n\n // 子元素大于1个,且不是 icon元素\n const specialSceneDefaultShow = newChildren?.length > 1 && !isIconBtn\n\n if (specialSceneDefaultShow && (!isCn || popConfirmHandle)) {\n newChildren?.forEach((v, i) => {\n const { type, props } = v\n if (\n type?.name === 'Popconfirm' ||\n (props.hasOwnProperty('onConfirm') && typeof props?.onConfirm === 'function')\n ) {\n let placement = {}\n if (\n !isCn ||\n (num &&\n !isNaN(num) &&\n i + 1 > num &&\n !(lessOneMoreFit && newChildren.length - num === 1))\n ) {\n placement = {\n placement: 'left',\n }\n }\n newChildren[i] = React.cloneElement(v, {\n overlayStyle: { width: 180 },\n ...(v?.props || {}),\n onClick: (e) => e.stopPropagation(),\n ...placement,\n trigger: 'hover',\n getPopupContainer: (trigger) => trigger.parentNode,\n })\n }\n })\n }\n\n let [preChildPart, lastChildPart] = [newChildren, null]\n\n // 只有1个时不适配\n if (lessOneMoreFit && newChildren.length - num === 1) {\n preChildPart = newChildren\n } else if (newChildren && num && !isNaN(num) && newChildren.length > num) {\n preChildPart = newChildren.slice(0, num)\n lastChildPart = newChildren.slice(num)\n }\n\n if (divider && preChildPart) {\n const preChildLen = preChildPart.length\n preChildPart = preChildPart.map((dom, i) => (\n <Fragment key={i}>\n {dom}\n {!(\n (i === preChildLen - 1 && !lastChildPart?.length) // 没有更多 且 是最后一个时 不显示 Divider\n ) && <Divider type=\"vertical\" />}\n </Fragment>\n ))\n }\n const menu = (childArr)=>(\n <Menu className=\"org-pop-opera-btn\">\n {\n childArr?.map(\n (child,i) => (\n <Menu.Item key={i}>\n {child}\n </Menu.Item>\n )\n )\n }\n </Menu>\n );\n\n\n if(!isCn && specialSceneDefaultShow ){\n return (\n <Dropdown overlay={menu(newChildren||[])} arrow onClick={(e)=>{\n if(stopPropagation){\n e.stopPropagation()\n }\n }}>\n {\n type === 'icon' ?\n <Icon type=\"more\" /> :\n <a className=\"ant-dropdown-more\">\n {locale?.more}\n <i className={`${clsPrefix}-dropdown-icon`}>\n <Icon type=\"down\" />\n </i>\n </a>\n }\n </Dropdown>\n );\n }\n\n return (\n <div\n onClick={(e) => {\n if(stopPropagation){\n e.stopPropagation()\n }\n }}\n {...rest}\n >\n {preChildPart}\n {!!lastChildPart?.length && (\n <Dropdown overlay={menu(lastChildPart || [])} arrow>\n {type === 'icon' ? (\n <Icon type=\"more\" />\n ) : (\n <a className=\"ant-dropdown-more\">\n {locale?.more}\n <i className={`${clsPrefix}-dropdown-icon`}>\n <Icon type=\"down\" />\n </i>\n </a>\n )}\n </Dropdown>\n )}\n </div>\n )\n }}\n </LocaleReceiver>\n )\n}\n"]}
@@ -1,5 +1,5 @@
1
- import Icon from 'antd/es/icon';
2
- import 'antd/es/icon/style';
3
- export * from 'antd/es/icon';
1
+ import Icon from 'antd/lib/icon';
2
+ import 'antd/lib/icon/style';
3
+ export * from 'antd/lib/icon';
4
4
  export default Icon;
5
5
  //# sourceMappingURL=index.d.ts.map
package/lib/icon/index.js CHANGED
@@ -1,24 +1,25 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ var _exportNames = {};
8
+ exports["default"] = void 0;
9
+ var _icon = _interopRequireWildcard(require("antd/lib/icon"));
10
+ Object.keys(_icon).forEach(function (key) {
11
+ if (key === "default" || key === "__esModule") return;
12
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
13
+ if (key in exports && exports[key] === _icon[key]) return;
14
+ Object.defineProperty(exports, key, {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _icon[key];
7
18
  }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- const icon_1 = __importDefault(require("antd/es/icon"));
21
- require("antd/es/icon/style");
22
- __exportStar(require("antd/es/icon"), exports);
23
- exports.default = icon_1.default;
24
- //# sourceMappingURL=index.js.map
19
+ });
20
+ });
21
+ require("antd/lib/icon/style");
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
+ var _default = _icon["default"];
25
+ exports["default"] = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icon/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,wDAA+B;AAE/B,8BAA2B;AAE3B,+CAA4B;AAE5B,kBAAe,cAAI,CAAA","sourcesContent":["import Icon from 'antd/es/icon'\n\nimport 'antd/es/icon/style'\n\nexport * from 'antd/es/icon'\n\nexport default Icon\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icon/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,wDAA+B;AAE/B,8BAA2B;AAE3B,+CAA4B;AAE5B,kBAAe,cAAI,CAAA","sourcesContent":["import Icon from 'antd/lib/icon'\n\nimport 'antd/lib/icon/style'\n\nexport * from 'antd/lib/icon'\n\nexport default Icon\n"]}
@@ -0,0 +1,3 @@
1
+ import '../../style/index.less';
2
+ import './index.less';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icon/style/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,cAAc,CAAA"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ require("../../style/index.less");
4
+ require("./index.less");
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon/style/index.tsx"],"names":[],"mappings":";;AAAA,kCAA+B;AAC/B,wBAAqB","sourcesContent":["import '../../style/index.less'\nimport './index.less'\n"]}
@@ -0,0 +1,4 @@
1
+ @import '../../style/themes/index';
2
+ @import '../../style/mixins/index';
3
+
4
+ @icon-prefix-cls: ~'@{ant-prefix}-icon';
@@ -1,122 +1,8 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = [
4
- 'system',
5
- 'entry',
6
- 'permission',
7
- 'graph',
8
- 'guanjia',
9
- 'case',
10
- 'celve1',
11
- 'shoucang',
12
- 'deal-type',
13
- 'pm',
14
- 'shoukuan',
15
- 'zhibiao',
16
- 'puzzle',
17
- 'user-group',
18
- 'yuce',
19
- 'jianmo',
20
- 'zhuanzhang',
21
- 'yunwei',
22
- 'baozhang',
23
- 'jizhang',
24
- 'tongji',
25
- 'pingfen',
26
- 'limit',
27
- 'spider',
28
- 'loan',
29
- 'access',
30
- 'role',
31
- 'org',
32
- 'celve',
33
- 'book',
34
- 'tag',
35
- 'shixufenxipeizhi',
36
- 'all-cases',
37
- 'xianeguanli',
38
- 'api',
39
- 'network',
40
- 'analysis',
41
- 'calendar',
42
- 'backup',
43
- 'all',
44
- 'attachment',
45
- 'chart-line',
46
- 'branches',
47
- 'chart-area',
48
- 'clock',
49
- 'check',
50
- 'charging-setting',
51
- 'chart-pie-alt',
52
- 'dashboard',
53
- 'datebase',
54
- 'check-reply',
55
- 'datacenter',
56
- 'connection',
57
- 'download',
58
- 'date-set',
59
- 'event',
60
- 'event-wait',
61
- 'fieldanalysis',
62
- 'exchange',
63
- 'knowledge',
64
- 'key',
65
- 'log',
66
- 'list',
67
- 'menu',
68
- 'index',
69
- 'project',
70
- 'monitorin',
71
- 'pointmap',
72
- 'ranking',
73
- 'model',
74
- 'plan',
75
- 'task',
76
- 'wait',
77
- 'upload',
78
- 'question-list',
79
- 'read',
80
- 'setting',
81
- 'reply',
82
- 'jinjianguanli',
83
- 'change-theme',
84
- 'application',
85
- 'flag-en',
86
- 'flag-cn',
87
- 'down',
88
- 'up',
89
- 'workflow',
90
- 'sync',
91
- 'folder',
92
- 'database',
93
- 'circle',
94
- 'edit',
95
- 'edit-color',
96
- 'box',
97
- 'layer',
98
- 'box-color',
99
- 'home-color',
100
- 'record',
101
- 'monitor',
102
- 'time-color',
103
- 'user',
104
- 'function-color',
105
- 'record-color',
106
- 'warning-color',
107
- 'layer-color',
108
- 'template',
109
- 'template-color',
110
- 'monitor-color',
111
- 'search',
112
- 'user-color',
113
- 'function',
114
- 'warning',
115
- 'search-color',
116
- 'home',
117
- 'time',
118
- 'application',
119
- 'plus',
120
- 'minus',
121
- ];
122
- //# sourceMappingURL=index.js.map
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _default = ['system', 'entry', 'permission', 'graph', 'guanjia', 'case', 'celve1', 'shoucang', 'deal-type', 'pm', 'shoukuan', 'zhibiao', 'puzzle', 'user-group', 'yuce', 'jianmo', 'zhuanzhang', 'yunwei', 'baozhang', 'jizhang', 'tongji', 'pingfen', 'limit', 'spider', 'loan', 'access', 'role', 'org', 'celve', 'book', 'tag', 'shixufenxipeizhi', 'all-cases', 'xianeguanli', 'api', 'network', 'analysis', 'calendar', 'backup', 'all', 'attachment', 'chart-line', 'branches', 'chart-area', 'clock', 'check', 'charging-setting', 'chart-pie-alt', 'dashboard', 'datebase', 'check-reply', 'datacenter', 'connection', 'download', 'date-set', 'event', 'event-wait', 'fieldanalysis', 'exchange', 'knowledge', 'key', 'log', 'list', 'menu', 'index', 'project', 'monitorin', 'pointmap', 'ranking', 'model', 'plan', 'task', 'wait', 'upload', 'question-list', 'read', 'setting', 'reply', 'jinjianguanli', 'change-theme', 'application', 'flag-en', 'flag-cn', 'down', 'up', 'workflow', 'sync', 'folder', 'database', 'circle', 'edit', 'edit-color', 'box', 'layer', 'box-color', 'home-color', 'record', 'monitor', 'time-color', 'user', 'function-color', 'record-color', 'warning-color', 'layer-color', 'template', 'template-color', 'monitor-color', 'search', 'user-color', 'function', 'warning', 'search-color', 'home', 'time', 'application', 'plus', 'minus'];
8
+ exports["default"] = _default;
@@ -1,47 +1,72 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _classnames = _interopRequireDefault(require("classnames"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
11
+ var t = {};
12
+ for (var p in s) {
13
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
14
+ }
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
17
+ }
18
+ return t;
12
19
  };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
20
+ var _default = function _default(props) {
21
+ var alt = props.alt,
22
+ title = props.title,
23
+ src = props.src,
24
+ width = props.width,
25
+ height = props.height,
26
+ _props$style = props.style,
27
+ style = _props$style === void 0 ? {} : _props$style,
28
+ className = props.className,
29
+ onError = props.onError,
30
+ shape = props.shape,
31
+ errorImgSrc = props.errorImgSrc,
32
+ type = props.type,
33
+ others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
34
+ var styles = Object.assign(Object.assign({}, style), {
35
+ display: 'inline-block',
36
+ width: width,
37
+ height: height,
38
+ overflow: 'hidden'
39
+ });
40
+ if (shape === 'rounded') {
41
+ styles.borderRadius = '5px';
42
+ } else if (shape === 'circle') {
43
+ styles.borderRadius = '50%';
44
+ }
45
+ var centerStyles = {
46
+ width: width,
47
+ height: height,
48
+ display: 'table-cell',
49
+ verticalAlign: 'middle',
50
+ textAlign: 'center'
51
+ };
52
+ var imgStyles = {
53
+ width: 'auto',
54
+ height: 'auto',
55
+ maxWidth: width,
56
+ maxHeight: height
57
+ };
58
+ var cls = (0, _classnames["default"])('tntd-img', shape, className);
59
+ return _react["default"].createElement("div", Object.assign({
60
+ className: cls,
61
+ style: styles
62
+ }, others), _react["default"].createElement("div", {
63
+ style: centerStyles
64
+ }, _react["default"].createElement("img", {
65
+ style: imgStyles,
66
+ onError: onError,
67
+ src: src,
68
+ alt: alt,
69
+ title: title
70
+ })));
15
71
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- const react_1 = __importDefault(require("react"));
18
- const classnames_1 = __importDefault(require("classnames"));
19
- exports.default = (props) => {
20
- const { alt, title, src, width, height, style = {}, className, onError, shape, errorImgSrc, type } = props, others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
21
- const styles = Object.assign(Object.assign({}, style), { display: 'inline-block', width,
22
- height, overflow: 'hidden' });
23
- if (shape === 'rounded') {
24
- styles.borderRadius = '5px';
25
- }
26
- else if (shape === 'circle') {
27
- styles.borderRadius = '50%';
28
- }
29
- const centerStyles = {
30
- width,
31
- height,
32
- display: 'table-cell',
33
- verticalAlign: 'middle',
34
- textAlign: 'center',
35
- };
36
- const imgStyles = {
37
- width: 'auto',
38
- height: 'auto',
39
- maxWidth: width,
40
- maxHeight: height,
41
- };
42
- const cls = (0, classnames_1.default)('tntd-img', shape, className);
43
- return (react_1.default.createElement("div", Object.assign({ className: cls, style: styles }, others),
44
- react_1.default.createElement("div", { style: centerStyles },
45
- react_1.default.createElement("img", { style: imgStyles, onError: onError, src: src, alt: alt, title: title }))));
46
- };
47
- //# sourceMappingURL=Contain.js.map
72
+ exports["default"] = _default;
package/lib/img/Cover.js CHANGED
@@ -1,83 +1,122 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _classnames = _interopRequireDefault(require("classnames"));
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
14
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
17
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
18
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
20
+ var t = {};
21
+ for (var p in s) {
22
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
23
+ }
24
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
25
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
26
+ }
27
+ return t;
12
28
  };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- const react_1 = __importDefault(require("react"));
18
- const react_2 = require("react");
19
- const classnames_1 = __importDefault(require("classnames"));
20
- exports.default = (props) => {
21
- const { alt, title, src, width, height, style = {}, className, onError, shape, errorImgSrc, type } = props, others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
22
- const imgRef = (0, react_2.useRef)();
23
- const [imgStyles, setImgStyles] = (0, react_2.useState)({
24
- display: 'block',
25
- maxWidth: 'none',
26
- width: 'auto',
27
- height: 'auto',
28
- // transition: 'opacity 0.2s ease',
29
- opacity: 0,
30
- });
31
- const getStyles = (wrapWidth, wrapHeight, imgWidth, imgHeight) => {
32
- // 进行等比运算
33
- const wrapRatio = wrapWidth / wrapHeight;
34
- const imgRatio = imgWidth / imgHeight;
35
- let finalWidth = 0;
36
- let finalHeight = 0;
37
- let finalMarginTop = 0;
38
- let finalMarginLeft = 0;
39
- if (wrapRatio > imgRatio) {
40
- // 父框宽度更大,以父框的宽度为准,拉伸图片上移
41
- finalWidth = wrapWidth;
42
- finalHeight = finalWidth / imgRatio;
43
- finalMarginTop = ((finalHeight - wrapHeight) / 2) * -1;
44
- }
45
- else {
46
- // 父框高度更大,以父框高度为准,拉伸图片左移动
47
- finalHeight = wrapHeight;
48
- finalWidth = finalHeight * imgRatio;
49
- finalMarginLeft = ((finalWidth - wrapWidth) / 2) * -1;
50
- }
51
- return {
52
- height: finalHeight,
53
- width: finalWidth,
54
- marginLeft: finalMarginLeft,
55
- marginTop: finalMarginTop,
56
- };
57
- };
58
- const imgOnload = () => {
59
- const imgDOM = imgRef.current;
60
- const { width, height } = props;
61
- const imgWidth = imgDOM.width;
62
- const imgHeight = imgDOM.height;
63
- const imgStyles2 = getStyles(width, height, imgWidth, imgHeight);
64
- setImgStyles(Object.assign(Object.assign(Object.assign({}, imgStyles), imgStyles2), { opacity: 1 }));
65
- };
66
- (0, react_2.useEffect)(() => {
67
- if (width || height) {
68
- imgOnload();
69
- }
70
- }, [width, height]);
71
- const styles = Object.assign(Object.assign({}, style), { display: 'inline-block', overflow: 'hidden', width,
72
- height });
73
- if (shape === 'rounded') {
74
- styles.borderRadius = '5px';
29
+ var _default = function _default(props) {
30
+ var alt = props.alt,
31
+ title = props.title,
32
+ src = props.src,
33
+ width = props.width,
34
+ height = props.height,
35
+ _props$style = props.style,
36
+ style = _props$style === void 0 ? {} : _props$style,
37
+ className = props.className,
38
+ onError = props.onError,
39
+ shape = props.shape,
40
+ errorImgSrc = props.errorImgSrc,
41
+ type = props.type,
42
+ others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
43
+ var imgRef = (0, _react.useRef)();
44
+ var _useState = (0, _react.useState)({
45
+ display: 'block',
46
+ maxWidth: 'none',
47
+ width: 'auto',
48
+ height: 'auto',
49
+ // transition: 'opacity 0.2s ease',
50
+ opacity: 0
51
+ }),
52
+ _useState2 = _slicedToArray(_useState, 2),
53
+ imgStyles = _useState2[0],
54
+ setImgStyles = _useState2[1];
55
+ var getStyles = function getStyles(wrapWidth, wrapHeight, imgWidth, imgHeight) {
56
+ // 进行等比运算
57
+ var wrapRatio = wrapWidth / wrapHeight;
58
+ var imgRatio = imgWidth / imgHeight;
59
+ var finalWidth = 0;
60
+ var finalHeight = 0;
61
+ var finalMarginTop = 0;
62
+ var finalMarginLeft = 0;
63
+ if (wrapRatio > imgRatio) {
64
+ // 父框宽度更大,以父框的宽度为准,拉伸图片上移
65
+ finalWidth = wrapWidth;
66
+ finalHeight = finalWidth / imgRatio;
67
+ finalMarginTop = (finalHeight - wrapHeight) / 2 * -1;
68
+ } else {
69
+ // 父框高度更大,以父框高度为准,拉伸图片左移动
70
+ finalHeight = wrapHeight;
71
+ finalWidth = finalHeight * imgRatio;
72
+ finalMarginLeft = (finalWidth - wrapWidth) / 2 * -1;
75
73
  }
76
- else if (shape === 'circle') {
77
- styles.borderRadius = '50%';
74
+ return {
75
+ height: finalHeight,
76
+ width: finalWidth,
77
+ marginLeft: finalMarginLeft,
78
+ marginTop: finalMarginTop
79
+ };
80
+ };
81
+ var imgOnload = function imgOnload() {
82
+ var imgDOM = imgRef.current;
83
+ var width = props.width,
84
+ height = props.height;
85
+ var imgWidth = imgDOM.width;
86
+ var imgHeight = imgDOM.height;
87
+ var imgStyles2 = getStyles(width, height, imgWidth, imgHeight);
88
+ setImgStyles(Object.assign(Object.assign(Object.assign({}, imgStyles), imgStyles2), {
89
+ opacity: 1
90
+ }));
91
+ };
92
+ (0, _react.useEffect)(function () {
93
+ if (width || height) {
94
+ imgOnload();
78
95
  }
79
- const cls = (0, classnames_1.default)('tntd-img', shape, className);
80
- return (react_1.default.createElement("div", Object.assign({ className: cls, style: styles }, others),
81
- react_1.default.createElement("img", { style: imgStyles, onError: onError, ref: imgRef, src: src, alt: alt, title: title, onLoad: imgOnload })));
96
+ }, [width, height]);
97
+ var styles = Object.assign(Object.assign({}, style), {
98
+ display: 'inline-block',
99
+ overflow: 'hidden',
100
+ width: width,
101
+ height: height
102
+ });
103
+ if (shape === 'rounded') {
104
+ styles.borderRadius = '5px';
105
+ } else if (shape === 'circle') {
106
+ styles.borderRadius = '50%';
107
+ }
108
+ var cls = (0, _classnames["default"])('tntd-img', shape, className);
109
+ return _react["default"].createElement("div", Object.assign({
110
+ className: cls,
111
+ style: styles
112
+ }, others), _react["default"].createElement("img", {
113
+ style: imgStyles,
114
+ onError: onError,
115
+ ref: imgRef,
116
+ src: src,
117
+ alt: alt,
118
+ title: title,
119
+ onLoad: imgOnload
120
+ }));
82
121
  };
83
- //# sourceMappingURL=Cover.js.map
122
+ exports["default"] = _default;