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,101 +1,143 @@
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]; } };
7
- }
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);
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
+ HeaderActionItem: true
15
9
  };
16
- var __rest = (this && this.__rest) || function (s, e) {
17
- var t = {};
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
- t[p] = s[p];
20
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
- t[p[i]] = s[p[i]];
24
- }
25
- return t;
10
+ exports["default"] = exports.HeaderActionItem = void 0;
11
+ var _react = _interopRequireDefault(require("react"));
12
+ var _styledComponents = require("styled-components");
13
+ var _Layout = _interopRequireDefault(require("./Layout"));
14
+ var _EnterpriseLayout = _interopRequireDefault(require("./EnterpriseLayout"));
15
+ var _paaslayout = _interopRequireDefault(require("./paaslayout"));
16
+ var _HeaderNavs = _interopRequireWildcard(require("./HeaderNavs"));
17
+ Object.keys(_HeaderNavs).forEach(function (key) {
18
+ if (key === "default" || key === "__esModule") return;
19
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
20
+ if (key in exports && exports[key] === _HeaderNavs[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _HeaderNavs[key];
25
+ }
26
+ });
27
+ });
28
+ var _HeaderTabs = _interopRequireDefault(require("./HeaderTabs"));
29
+ var _authContext = _interopRequireDefault(require("../auth-context"));
30
+ var _utils = require("../utils");
31
+ var _ActionsContext = _interopRequireDefault(require("./ActionsContext"));
32
+ var _createActions = _interopRequireDefault(require("./createActions"));
33
+ var _storage = require("./storage");
34
+ 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); }
35
+ 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; }
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
37
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
38
+ var t = {};
39
+ for (var p in s) {
40
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
41
+ }
42
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
43
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
44
+ }
45
+ return t;
26
46
  };
27
- var __importDefault = (this && this.__importDefault) || function (mod) {
28
- return (mod && mod.__esModule) ? mod : { "default": mod };
47
+ var HeaderActionItem = function HeaderActionItem(props) {
48
+ return _react["default"].createElement("li", Object.assign({}, props), props.children);
29
49
  };
30
- Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.HeaderActionItem = void 0;
32
- const react_1 = __importDefault(require("react"));
33
- const styled_components_1 = require("styled-components");
34
- const Layout_1 = __importDefault(require("./Layout"));
35
- const EnterpriseLayout_1 = __importDefault(require("./EnterpriseLayout"));
36
- const paaslayout_1 = __importDefault(require("./paaslayout"));
37
- const HeaderNavs_1 = __importDefault(require("./HeaderNavs"));
38
- const HeaderTabs_1 = __importDefault(require("./HeaderTabs"));
39
- const auth_context_1 = __importDefault(require("../auth-context"));
40
- const utils_1 = require("../utils");
41
- const ActionsContext_1 = __importDefault(require("./ActionsContext"));
42
- const createActions_1 = __importDefault(require("./createActions"));
43
- const storage_1 = require("./storage");
44
- const HeaderActionItem = (props) => react_1.default.createElement("li", Object.assign({}, props), props.children);
45
50
  exports.HeaderActionItem = HeaderActionItem;
46
- __exportStar(require("./HeaderNavs"), exports);
47
- const TNTLayout = (_a) => {
48
- var { type, config, showMenuInIframe = false } = _a, props = __rest(_a, ["type", "config", "showMenuInIframe"]);
49
- const headerHeight = props.size === 'large' ? 60 : 50;
50
- const theme = {
51
- size: props.size,
52
- compatible: props.compatible,
53
- headerHeight,
54
- primaryColor: '#126BFB',
55
- secondaryColor: '#005df4',
56
- primaryTextColor: '#17233D',
57
- secondaryTextColor: 'rgba(23,35,61,.8)',
58
- lightIconColor: 'rgba(23,35,61,.7)',
59
- headerActionsColor: 'rgba(23,35,61,.6)',
60
- borderColor: '#B2BECD',
61
- dividerColor: '#E1E6EE',
62
- lightBgColor: '#F1F2F5',
63
- blueBgColor: '#1D4295', // 默认的蓝色主题
64
- };
65
- const isInIframe = showMenuInIframe
66
- ? false
67
- : self !== top && !window.navigator.userAgent.includes('mo-fang-app');
68
- // 前期拼写错误,导致需要兼容处理
69
- const extraHeaderActions = props.extraHeaderActions || props.extralHeaderActions;
70
- const extendMap = typeof props.extendMap === 'string' ? (0, utils_1.safeParseJSON)(props.extendMap, {}) : props.extendMap;
71
- const { displayType = 'default', menuAlignMode, globalNavigation = false, language = ['cn'], themeSwitch = true, } = extendMap || {};
72
- const userInfo = props.userInfo || {};
73
- const actionsContextValue = (0, createActions_1.default)({
74
- language: (0, storage_1.getLanguageStore)() || userInfo.lang || 'cn',
75
- });
76
- const onLanguageChange = (language) => {
77
- actionsContextValue.setLanguage(language);
78
- props.onLanguageChange && props.onLanguageChange(language);
79
- };
80
- // layout上的指定的属性优先级会高于extendMap中的属性
81
- type = type || displayType;
82
- config = Object.assign({
83
- language: (language === null || language === void 0 ? void 0 : language.length) > 1,
84
- theme: themeSwitch,
85
- avatar: true,
86
- globalNavigation,
87
- }, config);
88
- return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
89
- react_1.default.createElement(auth_context_1.default.Provider, { value: (0, utils_1.getCheckAuth)(props.menus) },
90
- react_1.default.createElement(ActionsContext_1.default.Provider, { value: actionsContextValue },
91
- type === 'paas' && (react_1.default.createElement(paaslayout_1.default, Object.assign({ menuAlignMode: menuAlignMode, config: config }, props, { extraHeaderActions: extraHeaderActions, isInIframe: isInIframe, userInfo: userInfo, onLanguageChange: onLanguageChange }))),
92
- type === 'enterprise' && (react_1.default.createElement(EnterpriseLayout_1.default, Object.assign({ menuAlignMode: menuAlignMode, config: config }, props, { extraHeaderActions: extraHeaderActions, isInIframe: isInIframe, userInfo: userInfo, onLanguageChange: onLanguageChange, type: type }))),
93
- (!type || !['paas', 'enterprise'].includes(type)) && (react_1.default.createElement(Layout_1.default, Object.assign({ menuAlignMode: menuAlignMode, config: config }, props, { extraHeaderActions: extraHeaderActions, isInIframe: isInIframe, userInfo: userInfo, onLanguageChange: onLanguageChange })))))));
51
+ var TNTLayout = function TNTLayout(_a) {
52
+ var type = _a.type,
53
+ config = _a.config,
54
+ _a$showMenuInIframe = _a.showMenuInIframe,
55
+ showMenuInIframe = _a$showMenuInIframe === void 0 ? false : _a$showMenuInIframe,
56
+ props = __rest(_a, ["type", "config", "showMenuInIframe"]);
57
+ var headerHeight = props.size === 'large' ? 60 : 50;
58
+ var theme = {
59
+ size: props.size,
60
+ compatible: props.compatible,
61
+ headerHeight: headerHeight,
62
+ primaryColor: '#126BFB',
63
+ secondaryColor: '#005df4',
64
+ primaryTextColor: '#17233D',
65
+ secondaryTextColor: 'rgba(23,35,61,.8)',
66
+ lightIconColor: 'rgba(23,35,61,.7)',
67
+ headerActionsColor: 'rgba(23,35,61,.6)',
68
+ borderColor: '#B2BECD',
69
+ dividerColor: '#E1E6EE',
70
+ lightBgColor: '#F1F2F5',
71
+ blueBgColor: '#1D4295' // 默认的蓝色主题
72
+ };
73
+
74
+ var isInIframe = showMenuInIframe ? false : self !== top && !window.navigator.userAgent.includes('mo-fang-app');
75
+ // 前期拼写错误,导致需要兼容处理
76
+ var extraHeaderActions = props.extraHeaderActions || props.extralHeaderActions;
77
+ var extendMap = typeof props.extendMap === 'string' ? (0, _utils.safeParseJSON)(props.extendMap, {}) : props.extendMap;
78
+ var _ref = extendMap || {},
79
+ _ref$displayType = _ref.displayType,
80
+ displayType = _ref$displayType === void 0 ? 'default' : _ref$displayType,
81
+ menuAlignMode = _ref.menuAlignMode,
82
+ _ref$globalNavigation = _ref.globalNavigation,
83
+ globalNavigation = _ref$globalNavigation === void 0 ? false : _ref$globalNavigation,
84
+ _ref$language = _ref.language,
85
+ language = _ref$language === void 0 ? ['cn'] : _ref$language,
86
+ _ref$themeSwitch = _ref.themeSwitch,
87
+ themeSwitch = _ref$themeSwitch === void 0 ? true : _ref$themeSwitch;
88
+ var userInfo = props.userInfo || {};
89
+ var actionsContextValue = (0, _createActions["default"])({
90
+ language: (0, _storage.getLanguageStore)() || userInfo.lang || 'cn'
91
+ });
92
+ var onLanguageChange = function onLanguageChange(language) {
93
+ actionsContextValue.setLanguage(language);
94
+ props.onLanguageChange && props.onLanguageChange(language);
95
+ };
96
+ // layout上的指定的属性优先级会高于extendMap中的属性
97
+ type = type || displayType;
98
+ config = Object.assign({
99
+ language: (language === null || language === void 0 ? void 0 : language.length) > 1,
100
+ theme: themeSwitch,
101
+ avatar: true,
102
+ globalNavigation: globalNavigation
103
+ }, config);
104
+ return _react["default"].createElement(_styledComponents.ThemeProvider, {
105
+ theme: theme
106
+ }, _react["default"].createElement(_authContext["default"].Provider, {
107
+ value: (0, _utils.getCheckAuth)(props.menus)
108
+ }, _react["default"].createElement(_ActionsContext["default"].Provider, {
109
+ value: actionsContextValue
110
+ }, type === 'paas' && _react["default"].createElement(_paaslayout["default"], Object.assign({
111
+ menuAlignMode: menuAlignMode,
112
+ config: config
113
+ }, props, {
114
+ extraHeaderActions: extraHeaderActions,
115
+ isInIframe: isInIframe,
116
+ userInfo: userInfo,
117
+ onLanguageChange: onLanguageChange
118
+ })), type === 'enterprise' && _react["default"].createElement(_EnterpriseLayout["default"], Object.assign({
119
+ menuAlignMode: menuAlignMode,
120
+ config: config
121
+ }, props, {
122
+ extraHeaderActions: extraHeaderActions,
123
+ isInIframe: isInIframe,
124
+ userInfo: userInfo,
125
+ onLanguageChange: onLanguageChange,
126
+ type: type
127
+ })), (!type || !['paas', 'enterprise'].includes(type)) && _react["default"].createElement(_Layout["default"], Object.assign({
128
+ menuAlignMode: menuAlignMode,
129
+ config: config
130
+ }, props, {
131
+ extraHeaderActions: extraHeaderActions,
132
+ isInIframe: isInIframe,
133
+ userInfo: userInfo,
134
+ onLanguageChange: onLanguageChange
135
+ })))));
94
136
  };
95
- TNTLayout.HeaderActionItem = exports.HeaderActionItem;
96
- TNTLayout.HeaderNavs = HeaderNavs_1.default;
97
- TNTLayout.HeaderTabs = HeaderTabs_1.default;
98
- TNTLayout.AuthContext = auth_context_1.default;
99
- TNTLayout.findMenuInfoByPath = utils_1.findMenuInfoByPath;
100
- exports.default = TNTLayout;
101
- //# sourceMappingURL=index.js.map
137
+ TNTLayout.HeaderActionItem = HeaderActionItem;
138
+ TNTLayout.HeaderNavs = _HeaderNavs["default"];
139
+ TNTLayout.HeaderTabs = _HeaderTabs["default"];
140
+ TNTLayout.AuthContext = _authContext["default"];
141
+ TNTLayout.findMenuInfoByPath = _utils.findMenuInfoByPath;
142
+ var _default = TNTLayout;
143
+ exports["default"] = _default;
@@ -1,190 +1,139 @@
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]; } };
7
- }
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- const react_1 = __importStar(require("react"));
30
- const styled_components_1 = __importDefault(require("styled-components"));
31
- const classnames_1 = __importDefault(require("classnames"));
32
- const utils_1 = require("../../utils");
33
- const Iconfont_1 = __importDefault(require("../Iconfont"));
34
- const SideMenu = styled_components_1.default.ul `
35
- background: #fff;
36
- list-style: none;
37
- margin: 0;
38
- padding: 30px 0 20px;
39
- text-rendering: optimizeLegibility;
40
- -webkit-font-smoothing: antialiased;
41
- -moz-osx-font-smoothing: grayscale;
42
- .isInIframe & {
43
- display: none;
44
- }
45
-
46
- & > li {
47
- position: relative;
48
- cursor: pointer;
49
- line-height: 38px;
50
- font-size: 14px;
51
- color: #17233d;
52
- letter-spacing: 0;
53
-
54
- &.group-menu-item {
55
- & > span {
56
- opacity: 0.4;
57
- }
58
- }
59
-
60
- &.active {
61
- &:before {
62
- position: absolute;
63
- content: '';
64
- left: 0;
65
- top: 0;
66
- width: 3px;
67
- height: 100%;
68
- background: #126bfb;
69
- }
70
2
 
71
- span {
72
- background: rgba(18, 107, 251, 0.1);
73
- color: #126bfb;
74
- opacity: 1;
75
- }
76
- }
77
-
78
- & > span {
79
- display: inline-block;
80
- width: 100%;
81
- color: #17233d;
82
- padding-left: 20px;
83
-
84
- &:hover {
85
- color: #323232;
86
- background: #f5f5f5;
87
- }
88
-
89
- & > .tnt-icon {
90
- margin-right: 7px;
91
- }
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 _styledComponents = _interopRequireDefault(require("styled-components"));
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+ var _utils = require("../../utils");
12
+ var _Iconfont = _interopRequireDefault(require("../Iconfont"));
13
+ var _templateObject, _templateObject2;
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+ 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); }
16
+ 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; }
17
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
+ 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."); }
19
+ 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); }
20
+ 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; }
21
+ 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; } }
22
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
24
+ var SideMenu = _styledComponents["default"].ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: #fff;\n list-style: none;\n margin: 0;\n padding: 30px 0 20px;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n .isInIframe & {\n display: none;\n }\n\n & > li {\n position: relative;\n cursor: pointer;\n line-height: 38px;\n font-size: 14px;\n color: #17233d;\n letter-spacing: 0;\n\n &.group-menu-item {\n & > span {\n opacity: 0.4;\n }\n }\n\n &.active {\n &:before {\n position: absolute;\n content: '';\n left: 0;\n top: 0;\n width: 3px;\n height: 100%;\n background: #126bfb;\n }\n\n span {\n background: rgba(18, 107, 251, 0.1);\n color: #126bfb;\n opacity: 1;\n }\n }\n\n & > span {\n display: inline-block;\n width: 100%;\n color: #17233d;\n padding-left: 20px;\n\n &:hover {\n color: #323232;\n background: #f5f5f5;\n }\n\n & > .tnt-icon {\n margin-right: 7px;\n }\n }\n }\n"])));
25
+ var SubMenu = _styledComponents["default"].ul(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: #fff;\n list-style: none;\n font-size: 14px;\n color: #17233d;\n margin: 10px 0 0;\n padding: 0;\n li {\n position: relative;\n line-height: 38px;\n cursor: pointer;\n padding-left: 20px;\n & > a {\n color: #17233d;\n & > span {\n padding-left: 10px;\n }\n }\n &.active {\n background: #eaedf8;\n &:before {\n position: absolute;\n left: 0;\n top: 0;\n content: '';\n width: 4px;\n height: 100%;\n background-color: #4c79ff;\n }\n }\n }\n"])));
26
+ var _default = function _default(props) {
27
+ var language = props.language,
28
+ _props$menus = props.menus,
29
+ menus = _props$menus === void 0 ? [] : _props$menus,
30
+ formatMenuPath = props.formatMenuPath,
31
+ selectedKey = props.selectedKey,
32
+ onBeforeChange = props.onBeforeChange,
33
+ onChange = props.onChange,
34
+ onSelect = props.onSelect;
35
+ var _useState = (0, _react.useState)(selectedKey),
36
+ _useState2 = _slicedToArray(_useState, 2),
37
+ activeMenu = _useState2[0],
38
+ setActiveMenu = _useState2[1];
39
+ var defaultBeforeChange = function defaultBeforeChange(_ref) {
40
+ var data = _ref.data;
41
+ return !(0, _utils.isNewTabMenu)(data);
42
+ };
43
+ var defaultSelect = function defaultSelect(_ref2) {
44
+ var data = _ref2.data;
45
+ var _a;
46
+ var _ref3 = data || {},
47
+ path = _ref3.path;
48
+ var formatPath = formatMenuPath || function (path) {
49
+ return path;
50
+ };
51
+ if ((0, _utils.isNewTabMenu)(data)) {
52
+ (0, _utils.openInNewTab)(formatPath(data === null || data === void 0 ? void 0 : data.path, data));
53
+ return;
92
54
  }
93
- }
94
- `;
95
- const SubMenu = styled_components_1.default.ul `
96
- background: #fff;
97
- list-style: none;
98
- font-size: 14px;
99
- color: #17233d;
100
- margin: 10px 0 0;
101
- padding: 0;
102
- li {
103
- position: relative;
104
- line-height: 38px;
105
- cursor: pointer;
106
- padding-left: 20px;
107
- & > a {
108
- color: #17233d;
109
- & > span {
110
- padding-left: 10px;
111
- }
55
+ var routerPrefix = (_a = window.location.pathname.match(/(^\/[^\/]+)/i)) === null || _a === void 0 ? void 0 : _a[1];
56
+ if (window.location.pathname.startsWith(routerPrefix)) {
57
+ var forwardPath = formatPath(path, data);
58
+ changeRouter ? changeRouter(forwardPath, data) : window.history.pushState(data, data === null || data === void 0 ? void 0 : data.name, forwardPath);
59
+ } else {
60
+ window.location.href = formatPath(path, data);
112
61
  }
113
- &.active {
114
- background: #eaedf8;
115
- &:before {
116
- position: absolute;
117
- left: 0;
118
- top: 0;
119
- content: '';
120
- width: 4px;
121
- height: 100%;
122
- background-color: #4c79ff;
62
+ };
63
+ var selectMenu = function selectMenu() {
64
+ var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
65
+ var finalBeforeChange = onBeforeChange || defaultBeforeChange;
66
+ var finalSelect = onSelect || defaultSelect;
67
+ if (param.key !== activeMenu) {
68
+ if (finalBeforeChange(param, activeMenu)) {
69
+ setActiveMenu(param.key);
70
+ onChange && onChange(param);
123
71
  }
124
72
  }
125
- }
126
- `;
127
- exports.default = (props) => {
128
- const { language, menus = [], formatMenuPath, selectedKey, onBeforeChange, onChange, onSelect, } = props;
129
- const [activeMenu, setActiveMenu] = (0, react_1.useState)(selectedKey);
130
- const defaultBeforeChange = ({ data }) => !(0, utils_1.isNewTabMenu)(data);
131
- const defaultSelect = ({ data }) => {
132
- var _a;
133
- const { path } = data || {};
134
- const formatPath = formatMenuPath || ((path) => path);
135
- if ((0, utils_1.isNewTabMenu)(data)) {
136
- (0, utils_1.openInNewTab)(formatPath(data === null || data === void 0 ? void 0 : data.path, data));
137
- return;
138
- }
139
- const routerPrefix = (_a = window.location.pathname.match(/(^\/[^\/]+)/i)) === null || _a === void 0 ? void 0 : _a[1];
140
- if (window.location.pathname.startsWith(routerPrefix)) {
141
- const forwardPath = formatPath(path, data);
142
- changeRouter
143
- ? changeRouter(forwardPath, data)
144
- : window.history.pushState(data, data === null || data === void 0 ? void 0 : data.name, forwardPath);
145
- }
146
- else {
147
- window.location.href = formatPath(path, data);
148
- }
149
- };
150
- const selectMenu = (param = {}) => {
151
- const finalBeforeChange = onBeforeChange || defaultBeforeChange;
152
- const finalSelect = onSelect || defaultSelect;
153
- if (param.key !== activeMenu) {
154
- if (finalBeforeChange(param, activeMenu)) {
155
- setActiveMenu(param.key);
156
- onChange && onChange(param);
157
- }
158
- }
159
- finalSelect(param);
73
+ finalSelect(param);
74
+ };
75
+ var MenuItem = function MenuItem(_ref4) {
76
+ var item = _ref4.item;
77
+ var code = item.code,
78
+ groupName = item.groupName,
79
+ enName = item.enName,
80
+ _item$children = item.children,
81
+ children = _item$children === void 0 ? [] : _item$children;
82
+ var SubMenuItem = function SubMenuItem(_ref5) {
83
+ var menu = _ref5.menu;
84
+ var code = menu.code,
85
+ menuName = menu.menuName,
86
+ enName = menu.enName,
87
+ icon = menu.icon;
88
+ return _react["default"].createElement("li", {
89
+ key: code,
90
+ onClick: function onClick(evt) {
91
+ return selectMenu({
92
+ key: code,
93
+ data: menu,
94
+ domEvent: evt
95
+ });
96
+ },
97
+ className: (0, _classnames["default"])({
98
+ active: code === activeMenu
99
+ })
100
+ }, _react["default"].createElement("span", null, typeof (icon || '') === 'string' ? _react["default"].createElement(_Iconfont["default"], {
101
+ type: icon
102
+ }) : icon, {
103
+ cn: menuName,
104
+ en: enName
105
+ }[language]));
160
106
  };
161
- const MenuItem = ({ item }) => {
162
- const { code, groupName, enName, children = [] } = item;
163
- const SubMenuItem = ({ menu }) => {
164
- const { code, menuName, enName, icon } = menu;
165
- return (react_1.default.createElement("li", { key: code, onClick: (evt) => selectMenu({ key: code, data: menu, domEvent: evt }), className: (0, classnames_1.default)({ active: code === activeMenu }) },
166
- react_1.default.createElement("span", null,
167
- typeof (icon || '') === 'string' ? react_1.default.createElement(Iconfont_1.default, { type: icon }) : icon,
168
- {
169
- cn: menuName,
170
- en: enName,
171
- }[language])));
172
- };
173
- if (groupName && children.length) {
174
- return (react_1.default.createElement("li", { key: code, className: "group-menu-item" },
175
- react_1.default.createElement("span", null,
176
- icon instanceof react_1.Component ? icon : react_1.default.createElement(Iconfont_1.default, { type: icon }),
177
- {
178
- cn: groupName,
179
- en: enName,
180
- }[language]),
181
- react_1.default.createElement(SubMenu, null, children.map((subItem) => (react_1.default.createElement(SubMenuItem, { menu: subItem, key: subItem === null || subItem === void 0 ? void 0 : subItem.code }))))));
182
- }
183
- return react_1.default.createElement(SubMenuItem, { menu: item });
184
- };
185
- (0, react_1.useEffect)(() => {
186
- setActiveMenu(selectedKey);
187
- }, [selectedKey]);
188
- return (react_1.default.createElement(SideMenu, { className: "tnt-compact-sidemenu" }, menus.map((menu) => (react_1.default.createElement(MenuItem, { item: menu, key: menu.code })))));
107
+ if (groupName && children.length) {
108
+ return _react["default"].createElement("li", {
109
+ key: code,
110
+ className: "group-menu-item"
111
+ }, _react["default"].createElement("span", null, icon instanceof _react.Component ? icon : _react["default"].createElement(_Iconfont["default"], {
112
+ type: icon
113
+ }), {
114
+ cn: groupName,
115
+ en: enName
116
+ }[language]), _react["default"].createElement(SubMenu, null, children.map(function (subItem) {
117
+ return _react["default"].createElement(SubMenuItem, {
118
+ menu: subItem,
119
+ key: subItem === null || subItem === void 0 ? void 0 : subItem.code
120
+ });
121
+ })));
122
+ }
123
+ return _react["default"].createElement(SubMenuItem, {
124
+ menu: item
125
+ });
126
+ };
127
+ (0, _react.useEffect)(function () {
128
+ setActiveMenu(selectedKey);
129
+ }, [selectedKey]);
130
+ return _react["default"].createElement(SideMenu, {
131
+ className: "tnt-compact-sidemenu"
132
+ }, menus.map(function (menu) {
133
+ return _react["default"].createElement(MenuItem, {
134
+ item: menu,
135
+ key: menu.code
136
+ });
137
+ }));
189
138
  };
190
- //# sourceMappingURL=CompactSideMenu.js.map
139
+ exports["default"] = _default;