tntd 2.0.14 → 2.0.15

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 (447) hide show
  1. package/es/array-input/index.js +6 -31
  2. package/es/array-input/style/index.js +1 -0
  3. package/es/array-input/style/index.js.map +1 -0
  4. package/es/auth-context/style/index.js +1 -0
  5. package/es/auth-context/style/index.js.map +1 -0
  6. package/es/columns/index.js +6 -12
  7. package/es/development-login/LoginModal.js +4 -10
  8. package/es/development-login/style/index.js +1 -0
  9. package/es/development-login/style/index.js.map +1 -0
  10. package/es/drawer/drawer.js +5 -9
  11. package/es/drawer/drawer.js.map +1 -1
  12. package/es/drawer/drawer.less +13 -11
  13. package/es/ellipsis/index.js +14 -25
  14. package/es/ellipsis/style/index.js +1 -0
  15. package/es/ellipsis/style/index.js.map +1 -0
  16. package/es/empty/empty.js +9 -13
  17. package/es/empty/render-empty.js +22 -0
  18. package/es/empty/render-empty.js.map +1 -0
  19. package/es/empty/style/index.js +2 -0
  20. package/es/empty/style/index.js.map +1 -0
  21. package/es/handle/index.js +14 -27
  22. package/es/handle/style/index.js +1 -0
  23. package/es/handle/style/index.js.map +1 -0
  24. package/es/icon-list/style/index.js +1 -0
  25. package/es/icon-list/style/index.js.map +1 -0
  26. package/es/img/Contain.js +13 -19
  27. package/es/img/Cover.js +13 -24
  28. package/es/img/index.js +14 -21
  29. package/es/img/style/index.js +1 -0
  30. package/es/img/style/index.js.map +1 -0
  31. package/es/index.js +0 -1
  32. package/es/loading-button/index.js +6 -13
  33. package/es/loading-button/style/index.js +1 -0
  34. package/es/loading-button/style/index.js.map +1 -0
  35. package/es/locale/default.js +0 -2
  36. package/es/locale/en_US.js +0 -2
  37. package/es/locale/zh_CN.js +0 -2
  38. package/es/modal/index.js +11 -2
  39. package/es/modal/index.js.map +1 -1
  40. package/es/modal/modal.js +44 -0
  41. package/es/modal/modal.js.map +1 -0
  42. package/es/modal/modal.less +27 -25
  43. package/es/page/Box.js +19 -28
  44. package/es/page/index.js +22 -38
  45. package/es/page/style/index.js +1 -0
  46. package/es/page/style/index.js.map +1 -0
  47. package/es/page/utils.js +0 -5
  48. package/es/prev-locale.js +0 -3
  49. package/es/query-form/Field/Checkbox.js +4 -8
  50. package/es/query-form/Field/Select.js +10 -17
  51. package/es/query-form/Field/SelectInput.js +4 -18
  52. package/es/query-form/Field/fieldsMap.js +0 -1
  53. package/es/query-form/Field/index.js +2 -11
  54. package/es/query-form/createActions.js +0 -8
  55. package/es/query-form/index.js +2 -34
  56. package/es/query-form/style/index.js +1 -0
  57. package/es/query-form/style/index.js.map +1 -0
  58. package/es/query-list-scene/List.js +18 -39
  59. package/es/query-list-scene/QueryForm.js +10 -19
  60. package/es/query-list-scene/QueryListScene.js +0 -2
  61. package/es/query-list-scene/Toolbar.js +6 -10
  62. package/es/query-list-scene/createActions.js +0 -3
  63. package/es/query-list-scene/style/index.js +1 -0
  64. package/es/query-list-scene/style/index.js.map +1 -0
  65. package/es/render-empty/render-empty.js +0 -2
  66. package/es/render-empty/style/index.js +1 -0
  67. package/es/render-empty/style/index.js.map +1 -0
  68. package/es/steps/steps.js +9 -17
  69. package/es/svg-components/illustration-403.js +0 -2
  70. package/es/svg-components/illustration-404.js +0 -2
  71. package/es/svg-components/illustration-500.js +0 -2
  72. package/es/svg-components/illustration-empty.js +0 -2
  73. package/es/svg-components/illustration-failure.js +0 -2
  74. package/es/svg-components/illustration-no-access.js +0 -2
  75. package/es/svg-components/illustration-no-chart.js +0 -2
  76. package/es/svg-components/illustration-no-result.js +0 -2
  77. package/es/svg-components/illustration-offline.js +0 -2
  78. package/es/svg-components/illustration-success.js +0 -2
  79. package/es/table/assets/image-loading-background.js +0 -2
  80. package/es/table/assets/image-loading.js +0 -2
  81. package/es/table/hooks/use-column-setting.js +0 -1
  82. package/es/table/style/index.js +2 -0
  83. package/es/table/style/index.js.map +1 -0
  84. package/es/table/table.js +14 -19
  85. package/es/table/table.stories.js +0 -2
  86. package/es/table/utils.js +2 -6
  87. package/es/title/index.js +10 -14
  88. package/es/title/style/index.js +1 -0
  89. package/es/title/style/index.js.map +1 -0
  90. package/es/tntd-cascader/AntdCascader/component/context.js +2 -4
  91. package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +0 -2
  92. package/es/tntd-cascader/AntdCascader/component/getIcons.js +6 -15
  93. package/es/tntd-cascader/AntdCascader/config/utils.js +0 -2
  94. package/es/tntd-cascader/AntdCascader/config/warning.js +4 -8
  95. package/es/tntd-cascader/AntdCascader/index.js +51 -73
  96. package/es/tntd-cascader/rc-cascader/Cascader.js +86 -113
  97. package/es/tntd-cascader/rc-cascader/OptionList/Column.js +16 -26
  98. package/es/tntd-cascader/rc-cascader/OptionList/index.js +26 -43
  99. package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -7
  100. package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +12 -41
  101. package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +4 -10
  102. package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +2 -4
  103. package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +0 -1
  104. package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +0 -1
  105. package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +2 -7
  106. package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +8 -15
  107. package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +2 -6
  108. package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +2 -4
  109. package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +2 -7
  110. package/es/tntd-icon/fonts/iconfont.js +7 -12
  111. package/es/tntd-icon/index.js +5 -9
  112. package/es/tntd-icon/style/index.js +1 -0
  113. package/es/tntd-icon/style/index.js.map +1 -0
  114. package/es/tntd-layout/ActionsContext.js +2 -2
  115. package/es/tntd-layout/AppList.js +2 -14
  116. package/es/tntd-layout/Application.js +0 -4
  117. package/es/tntd-layout/Avatar.js +0 -4
  118. package/es/tntd-layout/CompatibleLanguage.js +0 -13
  119. package/es/tntd-layout/EnterpriseLayout/Avatar.js +0 -4
  120. package/es/tntd-layout/EnterpriseLayout/Language.js +0 -6
  121. package/es/tntd-layout/EnterpriseLayout/Theme.js +0 -4
  122. package/es/tntd-layout/EnterpriseLayout/index.js +2 -2
  123. package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +2 -33
  124. package/es/tntd-layout/GlobalNavigation/index.js +0 -6
  125. package/es/tntd-layout/HeaderActions.js +28 -32
  126. package/es/tntd-layout/HeaderNavs.js +6 -14
  127. package/es/tntd-layout/HeaderTabs.js +14 -35
  128. package/es/tntd-layout/Language.js +0 -6
  129. package/es/tntd-layout/Layout.js +2 -7
  130. package/es/tntd-layout/Logo.js +4 -11
  131. package/es/tntd-layout/OrgAppList.js +22 -39
  132. package/es/tntd-layout/SideMenu.js +8 -45
  133. package/es/tntd-layout/Theme.js +0 -6
  134. package/es/tntd-layout/index.js +9 -17
  135. package/es/tntd-layout/paaslayout/CompactSideMenu.js +0 -15
  136. package/es/tntd-layout/paaslayout/SideMenu.js +0 -15
  137. package/es/tntd-layout/paaslayout/index.js +4 -13
  138. package/es/tntd-layout/storage.js +2 -2
  139. package/es/tntd-layout/style/index.js +1 -0
  140. package/es/tntd-layout/style/index.js.map +1 -0
  141. package/es/tntd-modal/index.js +12 -18
  142. package/es/tntd-modal/style/index.js +1 -0
  143. package/es/tntd-modal/style/index.js.map +1 -0
  144. package/es/tntd-second-page/index.js +0 -3
  145. package/es/tntd-select/DropDownWrap.js +4 -8
  146. package/es/tntd-select/index.js +74 -118
  147. package/es/tntd-select/style/index.js +1 -0
  148. package/es/tntd-select/style/index.js.map +1 -0
  149. package/es/utils/checkAuth.js +0 -1
  150. package/es/utils/findMenuInfoByPath.js +0 -3
  151. package/es/utils/index.js +2 -11
  152. package/lib/affix/index.js +4 -10
  153. package/lib/alert/index.js +4 -10
  154. package/lib/anchor/index.js +4 -10
  155. package/lib/array-input/icon.js +1 -7
  156. package/lib/array-input/index.js +41 -91
  157. package/lib/array-input/style/index.d.ts +1 -0
  158. package/lib/array-input/style/index.d.ts.map +1 -0
  159. package/lib/array-input/style/index.js +1 -0
  160. package/lib/array-input/style/index.js.map +1 -0
  161. package/lib/auth-context/index.js +0 -3
  162. package/lib/auth-context/style/index.d.ts +1 -0
  163. package/lib/auth-context/style/index.d.ts.map +1 -0
  164. package/lib/auth-context/style/index.js +1 -0
  165. package/lib/auth-context/style/index.js.map +1 -0
  166. package/lib/auto-complete/index.js +4 -10
  167. package/lib/avatar/index.js +4 -10
  168. package/lib/back-top/index.js +4 -10
  169. package/lib/badge/index.js +4 -10
  170. package/lib/breadcrumb/index.js +4 -10
  171. package/lib/button/index.js +4 -10
  172. package/lib/calendar/index.js +4 -10
  173. package/lib/card/index.js +4 -10
  174. package/lib/carousel/index.js +4 -10
  175. package/lib/cascader/index.js +4 -10
  176. package/lib/checkbox/index.js +4 -10
  177. package/lib/col/index.js +4 -10
  178. package/lib/collapse/index.js +4 -11
  179. package/lib/columns/index.js +14 -28
  180. package/lib/comment/index.js +4 -10
  181. package/lib/config-provider/config-provider.js +0 -2
  182. package/lib/config-provider/index.js +4 -10
  183. package/lib/date-picker/index.js +4 -10
  184. package/lib/descriptions/index.js +4 -10
  185. package/lib/development-login/LoginModal.js +25 -50
  186. package/lib/development-login/index.js +11 -22
  187. package/lib/development-login/style/index.d.ts +1 -0
  188. package/lib/development-login/style/index.d.ts.map +1 -0
  189. package/lib/development-login/style/index.js +1 -0
  190. package/lib/development-login/style/index.js.map +1 -0
  191. package/lib/divider/index.js +4 -10
  192. package/lib/drawer/drawer.d.ts.map +1 -1
  193. package/lib/drawer/drawer.js +7 -17
  194. package/lib/drawer/drawer.js.map +1 -1
  195. package/lib/drawer/drawer.less +13 -11
  196. package/lib/drawer/index.js +1 -5
  197. package/lib/dropdown/index.js +4 -10
  198. package/lib/ellipsis/Svg/CopySVG.js +0 -4
  199. package/lib/ellipsis/Svg/TickSVG.js +0 -4
  200. package/lib/ellipsis/index.js +42 -73
  201. package/lib/ellipsis/style/index.d.ts +1 -0
  202. package/lib/ellipsis/style/index.d.ts.map +1 -0
  203. package/lib/ellipsis/style/index.js +1 -0
  204. package/lib/ellipsis/style/index.js.map +1 -0
  205. package/lib/empty/empty.js +14 -30
  206. package/lib/empty/empty.stories.js +3 -21
  207. package/lib/empty/index.js +1 -5
  208. package/lib/empty/render-empty.d.ts +3 -0
  209. package/lib/empty/render-empty.d.ts.map +1 -0
  210. package/lib/empty/render-empty.js +32 -0
  211. package/lib/empty/render-empty.js.map +1 -0
  212. package/lib/empty/style/index.d.ts +3 -0
  213. package/lib/empty/style/index.d.ts.map +1 -0
  214. package/lib/empty/style/index.js +4 -0
  215. package/lib/empty/style/index.js.map +1 -0
  216. package/lib/exception/exception.js +7 -14
  217. package/lib/exception/index.js +1 -4
  218. package/lib/form/index.js +4 -10
  219. package/lib/handle/index.js +19 -46
  220. package/lib/handle/style/index.d.ts +1 -0
  221. package/lib/handle/style/index.d.ts.map +1 -0
  222. package/lib/handle/style/index.js +1 -0
  223. package/lib/handle/style/index.js.map +1 -0
  224. package/lib/icon/index.js +4 -10
  225. package/lib/icon-list/style/index.d.ts +3 -0
  226. package/lib/icon-list/style/index.d.ts.map +1 -0
  227. package/lib/icon-list/style/index.js +8 -0
  228. package/lib/icon-list/style/index.js.map +1 -0
  229. package/lib/img/Contain.js +12 -23
  230. package/lib/img/Cover.js +31 -53
  231. package/lib/img/index.js +29 -47
  232. package/lib/img/style/index.d.ts +1 -0
  233. package/lib/img/style/index.d.ts.map +1 -0
  234. package/lib/img/style/index.js +1 -0
  235. package/lib/img/style/index.js.map +1 -0
  236. package/lib/index.js +100 -187
  237. package/lib/input/index.js +4 -10
  238. package/lib/input-number/index.js +4 -10
  239. package/lib/layout/index.js +4 -10
  240. package/lib/list/index.js +4 -10
  241. package/lib/loading-button/index.js +15 -32
  242. package/lib/loading-button/style/index.d.ts +1 -0
  243. package/lib/loading-button/style/index.d.ts.map +1 -0
  244. package/lib/loading-button/style/index.js +1 -0
  245. package/lib/loading-button/style/index.js.map +1 -0
  246. package/lib/locale/default.js +0 -5
  247. package/lib/locale/en_US.js +0 -4
  248. package/lib/locale/index.js +3 -6
  249. package/lib/locale/zh_CN.js +0 -4
  250. package/lib/locale-provider/index.js +4 -10
  251. package/lib/mention/index.js +4 -10
  252. package/lib/mentions/index.js +4 -10
  253. package/lib/menu/index.js +4 -10
  254. package/lib/message/index.js +4 -11
  255. package/lib/modal/index.d.ts +2 -2
  256. package/lib/modal/index.d.ts.map +1 -1
  257. package/lib/modal/index.js +13 -14
  258. package/lib/modal/index.js.map +1 -1
  259. package/lib/modal/modal.d.ts +15 -0
  260. package/lib/modal/modal.d.ts.map +1 -0
  261. package/lib/modal/modal.js +66 -0
  262. package/lib/modal/modal.js.map +1 -0
  263. package/lib/modal/modal.less +27 -25
  264. package/lib/notification/index.js +4 -10
  265. package/lib/page/Box.js +24 -37
  266. package/lib/page/index.js +37 -66
  267. package/lib/page/style/index.d.ts +1 -0
  268. package/lib/page/style/index.d.ts.map +1 -0
  269. package/lib/page/style/index.js +1 -0
  270. package/lib/page/style/index.js.map +1 -0
  271. package/lib/page/utils.js +1 -9
  272. package/lib/page-header/index.js +4 -10
  273. package/lib/pagination/index.js +4 -10
  274. package/lib/popconfirm/index.js +4 -10
  275. package/lib/popover/index.js +4 -10
  276. package/lib/prev-locale.js +1 -10
  277. package/lib/progress/index.js +4 -10
  278. package/lib/query-form/Field/Checkbox.js +2 -11
  279. package/lib/query-form/Field/Select.js +27 -45
  280. package/lib/query-form/Field/SelectInput.js +21 -46
  281. package/lib/query-form/Field/fieldsMap.js +1 -12
  282. package/lib/query-form/Field/index.js +38 -70
  283. package/lib/query-form/createActions.js +0 -7
  284. package/lib/query-form/index.js +52 -121
  285. package/lib/query-form/style/index.d.ts +1 -0
  286. package/lib/query-form/style/index.d.ts.map +1 -0
  287. package/lib/query-form/style/index.js +1 -0
  288. package/lib/query-form/style/index.js.map +1 -0
  289. package/lib/query-form/useForm.js +0 -4
  290. package/lib/query-list-scene/List.js +58 -111
  291. package/lib/query-list-scene/QueryForm.js +37 -67
  292. package/lib/query-list-scene/QueryListScene.js +21 -42
  293. package/lib/query-list-scene/Title.js +1 -5
  294. package/lib/query-list-scene/Toolbar.js +8 -15
  295. package/lib/query-list-scene/createActions.js +0 -6
  296. package/lib/query-list-scene/index.js +0 -10
  297. package/lib/query-list-scene/style/index.d.ts +1 -0
  298. package/lib/query-list-scene/style/index.d.ts.map +1 -0
  299. package/lib/query-list-scene/style/index.js +1 -0
  300. package/lib/query-list-scene/style/index.js.map +1 -0
  301. package/lib/query-list-scene/useActions.js +0 -4
  302. package/lib/radio/index.js +4 -10
  303. package/lib/rate/index.js +4 -10
  304. package/lib/render-empty/index.js +0 -2
  305. package/lib/render-empty/render-empty.js +0 -8
  306. package/lib/render-empty/style/index.d.ts +2 -0
  307. package/lib/render-empty/style/index.d.ts.map +1 -0
  308. package/lib/render-empty/style/index.js +3 -0
  309. package/lib/render-empty/style/index.js.map +1 -0
  310. package/lib/result/index.js +4 -10
  311. package/lib/row/index.js +4 -10
  312. package/lib/select/index.js +4 -10
  313. package/lib/skeleton/index.js +4 -10
  314. package/lib/slider/index.js +4 -10
  315. package/lib/spin/index.js +4 -10
  316. package/lib/statistic/index.js +4 -10
  317. package/lib/steps/index.js +1 -5
  318. package/lib/steps/steps.js +12 -29
  319. package/lib/svg-components/illustration-403.js +3 -9
  320. package/lib/svg-components/illustration-404.js +3 -9
  321. package/lib/svg-components/illustration-500.js +3 -9
  322. package/lib/svg-components/illustration-empty.js +3 -9
  323. package/lib/svg-components/illustration-failure.js +3 -9
  324. package/lib/svg-components/illustration-no-access.js +3 -9
  325. package/lib/svg-components/illustration-no-chart.js +3 -9
  326. package/lib/svg-components/illustration-no-result.js +3 -9
  327. package/lib/svg-components/illustration-offline.js +3 -9
  328. package/lib/svg-components/illustration-success.js +3 -9
  329. package/lib/svg-components/index.js +0 -11
  330. package/lib/switch/index.js +4 -10
  331. package/lib/table/assets/image-loading-background.js +3 -9
  332. package/lib/table/assets/image-loading.js +3 -9
  333. package/lib/table/context.js +0 -2
  334. package/lib/table/hooks/index.js +1 -2
  335. package/lib/table/hooks/use-column-setting.js +8 -16
  336. package/lib/table/index.js +1 -5
  337. package/lib/table/style/index.d.ts +3 -0
  338. package/lib/table/style/index.d.ts.map +1 -0
  339. package/lib/table/style/index.js +4 -0
  340. package/lib/table/style/index.js.map +1 -0
  341. package/lib/table/table.js +34 -63
  342. package/lib/table/table.stories.js +2 -11
  343. package/lib/table/utils.js +2 -11
  344. package/lib/tabs/index.js +4 -10
  345. package/lib/tag/index.js +4 -10
  346. package/lib/time-picker/index.js +4 -10
  347. package/lib/timeline/index.js +4 -10
  348. package/lib/title/index.js +10 -20
  349. package/lib/title/style/index.d.ts +1 -0
  350. package/lib/title/style/index.d.ts.map +1 -0
  351. package/lib/title/style/index.js +1 -0
  352. package/lib/title/style/index.js.map +1 -0
  353. package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +4 -11
  354. package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +3 -8
  355. package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +3 -8
  356. package/lib/tntd-cascader/AntdCascader/component/context.js +3 -9
  357. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +4 -12
  358. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +19 -37
  359. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +8 -17
  360. package/lib/tntd-cascader/AntdCascader/config/utils.js +6 -15
  361. package/lib/tntd-cascader/AntdCascader/config/warning.js +7 -15
  362. package/lib/tntd-cascader/AntdCascader/index.js +80 -133
  363. package/lib/tntd-cascader/AntdCascader/interface.js +0 -3
  364. package/lib/tntd-cascader/index.js +0 -2
  365. package/lib/tntd-cascader/rc-cascader/Cascader.js +123 -188
  366. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +11 -21
  367. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +60 -88
  368. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +65 -109
  369. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +18 -33
  370. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +56 -106
  371. package/lib/tntd-cascader/rc-cascader/context.js +3 -8
  372. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +14 -31
  373. package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +5 -15
  374. package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +3 -11
  375. package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +3 -8
  376. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +3 -15
  377. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +26 -41
  378. package/lib/tntd-cascader/rc-cascader/index.js +0 -3
  379. package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +9 -20
  380. package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +0 -8
  381. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +7 -14
  382. package/lib/tntd-icon/fonts/iconfont.js +7 -12
  383. package/lib/tntd-icon/index.js +6 -17
  384. package/lib/tntd-icon/style/index.d.ts +1 -0
  385. package/lib/tntd-icon/style/index.d.ts.map +1 -0
  386. package/lib/tntd-icon/style/index.js +1 -0
  387. package/lib/tntd-icon/style/index.js.map +1 -0
  388. package/lib/tntd-layout/ActionsContext.js +0 -3
  389. package/lib/tntd-layout/AppList.js +30 -105
  390. package/lib/tntd-layout/Application.js +22 -84
  391. package/lib/tntd-layout/Avatar.js +18 -72
  392. package/lib/tntd-layout/CompatibleLanguage.js +32 -105
  393. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +24 -80
  394. package/lib/tntd-layout/EnterpriseLayout/Language.js +14 -45
  395. package/lib/tntd-layout/EnterpriseLayout/Theme.js +16 -46
  396. package/lib/tntd-layout/EnterpriseLayout/index.js +4 -12
  397. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +45 -174
  398. package/lib/tntd-layout/GlobalNavigation/index.js +19 -70
  399. package/lib/tntd-layout/Header.js +20 -54
  400. package/lib/tntd-layout/HeaderActions.js +33 -64
  401. package/lib/tntd-layout/HeaderNavs.js +19 -59
  402. package/lib/tntd-layout/HeaderTabs.js +43 -111
  403. package/lib/tntd-layout/Iconfont.js +0 -5
  404. package/lib/tntd-layout/Language.js +14 -45
  405. package/lib/tntd-layout/Layout.js +74 -113
  406. package/lib/tntd-layout/Logo.js +14 -41
  407. package/lib/tntd-layout/OrgAppList.js +51 -119
  408. package/lib/tntd-layout/SideMenu.js +42 -120
  409. package/lib/tntd-layout/Theme.js +19 -71
  410. package/lib/tntd-layout/createActions.js +0 -5
  411. package/lib/tntd-layout/images/index.js +0 -28
  412. package/lib/tntd-layout/index.js +21 -49
  413. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +29 -81
  414. package/lib/tntd-layout/paaslayout/Header.js +14 -47
  415. package/lib/tntd-layout/paaslayout/Logo.js +2 -19
  416. package/lib/tntd-layout/paaslayout/SideMenu.js +31 -82
  417. package/lib/tntd-layout/paaslayout/index.js +62 -108
  418. package/lib/tntd-layout/storage.d.ts +1 -1
  419. package/lib/tntd-layout/storage.d.ts.map +1 -1
  420. package/lib/tntd-layout/storage.js +3 -33
  421. package/lib/tntd-layout/style/index.d.ts +1 -0
  422. package/lib/tntd-layout/style/index.d.ts.map +1 -0
  423. package/lib/tntd-layout/style/index.js +1 -0
  424. package/lib/tntd-layout/style/index.js.map +1 -0
  425. package/lib/tntd-modal/index.js +32 -51
  426. package/lib/tntd-modal/style/index.d.ts +1 -0
  427. package/lib/tntd-modal/style/index.d.ts.map +1 -0
  428. package/lib/tntd-modal/style/index.js +1 -0
  429. package/lib/tntd-modal/style/index.js.map +1 -0
  430. package/lib/tntd-second-page/index.js +14 -24
  431. package/lib/tntd-select/DropDownWrap.js +24 -45
  432. package/lib/tntd-select/index.js +117 -206
  433. package/lib/tntd-select/style/index.d.ts +1 -0
  434. package/lib/tntd-select/style/index.d.ts.map +1 -0
  435. package/lib/tntd-select/style/index.js +1 -0
  436. package/lib/tntd-select/style/index.js.map +1 -0
  437. package/lib/tooltip/index.js +4 -10
  438. package/lib/transfer/index.js +4 -10
  439. package/lib/tree/index.js +4 -10
  440. package/lib/tree-select/index.js +4 -10
  441. package/lib/typography/index.js +4 -10
  442. package/lib/upload/index.js +4 -10
  443. package/lib/utils/checkAuth.js +4 -10
  444. package/lib/utils/findMenuInfoByPath.js +1 -7
  445. package/lib/utils/index.js +13 -41
  446. package/lib/version/index.js +4 -10
  447. package/package.json +1 -1
package/es/img/Contain.js CHANGED
@@ -1,45 +1,39 @@
1
1
  var __rest = this && this.__rest || function (s, e) {
2
2
  var t = {};
3
-
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
-
6
4
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
5
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
6
  }
9
7
  return t;
10
8
  };
11
-
12
9
  import React from 'react';
13
10
  import classnames from 'classnames';
14
11
  export default (props => {
15
12
  const {
16
- alt,
17
- title,
18
- src,
19
- width,
20
- height,
21
- style = {},
22
- className,
23
- onError,
24
- shape,
25
- errorImgSrc,
26
- type
27
- } = props,
28
- others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
29
-
13
+ alt,
14
+ title,
15
+ src,
16
+ width,
17
+ height,
18
+ style = {},
19
+ className,
20
+ onError,
21
+ shape,
22
+ errorImgSrc,
23
+ type
24
+ } = props,
25
+ others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
30
26
  const styles = Object.assign(Object.assign({}, style), {
31
27
  display: 'inline-block',
32
28
  width,
33
29
  height,
34
30
  overflow: 'hidden'
35
31
  });
36
-
37
32
  if (shape === 'rounded') {
38
33
  styles.borderRadius = '5px';
39
34
  } else if (shape === 'circle') {
40
35
  styles.borderRadius = '50%';
41
36
  }
42
-
43
37
  const centerStyles = {
44
38
  width,
45
39
  height,
package/es/img/Cover.js CHANGED
@@ -1,33 +1,29 @@
1
1
  var __rest = this && this.__rest || function (s, e) {
2
2
  var t = {};
3
-
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
-
6
4
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
5
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
6
  }
9
7
  return t;
10
8
  };
11
-
12
9
  import React from 'react';
13
10
  import { useEffect, useState, useRef } from 'react';
14
11
  import classnames from 'classnames';
15
12
  export default (props => {
16
13
  const {
17
- alt,
18
- title,
19
- src,
20
- width,
21
- height,
22
- style = {},
23
- className,
24
- onError,
25
- shape,
26
- errorImgSrc,
27
- type
28
- } = props,
29
- others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
30
-
14
+ alt,
15
+ title,
16
+ src,
17
+ width,
18
+ height,
19
+ style = {},
20
+ className,
21
+ onError,
22
+ shape,
23
+ errorImgSrc,
24
+ type
25
+ } = props,
26
+ others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
31
27
  const imgRef = useRef();
32
28
  const [imgStyles, setImgStyles] = useState({
33
29
  display: 'block',
@@ -37,7 +33,6 @@ export default (props => {
37
33
  // transition: 'opacity 0.2s ease',
38
34
  opacity: 0
39
35
  });
40
-
41
36
  const getStyles = (wrapWidth, wrapHeight, imgWidth, imgHeight) => {
42
37
  // 进行等比运算
43
38
  const wrapRatio = wrapWidth / wrapHeight;
@@ -46,7 +41,6 @@ export default (props => {
46
41
  let finalHeight = 0;
47
42
  let finalMarginTop = 0;
48
43
  let finalMarginLeft = 0;
49
-
50
44
  if (wrapRatio > imgRatio) {
51
45
  // 父框宽度更大,以父框的宽度为准,拉伸图片上移
52
46
  finalWidth = wrapWidth;
@@ -58,7 +52,6 @@ export default (props => {
58
52
  finalWidth = finalHeight * imgRatio;
59
53
  finalMarginLeft = (finalWidth - wrapWidth) / 2 * -1;
60
54
  }
61
-
62
55
  return {
63
56
  height: finalHeight,
64
57
  width: finalWidth,
@@ -66,7 +59,6 @@ export default (props => {
66
59
  marginTop: finalMarginTop
67
60
  };
68
61
  };
69
-
70
62
  const imgOnload = () => {
71
63
  const imgDOM = imgRef.current;
72
64
  const {
@@ -80,7 +72,6 @@ export default (props => {
80
72
  opacity: 1
81
73
  }));
82
74
  };
83
-
84
75
  useEffect(() => {
85
76
  if (width || height) {
86
77
  imgOnload();
@@ -92,13 +83,11 @@ export default (props => {
92
83
  width,
93
84
  height
94
85
  });
95
-
96
86
  if (shape === 'rounded') {
97
87
  styles.borderRadius = '5px';
98
88
  } else if (shape === 'circle') {
99
89
  styles.borderRadius = '50%';
100
90
  }
101
-
102
91
  const cls = classnames('tntd-img', shape, className);
103
92
  return React.createElement("div", Object.assign({
104
93
  className: cls,
package/es/img/index.js CHANGED
@@ -1,44 +1,37 @@
1
1
  var __rest = this && this.__rest || function (s, e) {
2
2
  var t = {};
3
-
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
-
6
4
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
5
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
6
  }
9
7
  return t;
10
8
  };
11
-
12
9
  import React, { Fragment, useState } from 'react';
13
10
  import Cover from './Cover';
14
11
  import Contain from './Contain';
15
12
  export default (props => {
16
13
  const _a = props || {},
17
- {
18
- type = 'cover',
19
- src,
20
- shape = 'sharp',
21
- title = '',
22
- alt = '',
23
- className,
24
- style,
25
- width = 'auto',
26
- height = 'auto',
27
- errorImgSrc,
28
- onError
29
- } = _a,
30
- rest = __rest(_a, ["type", "src", "shape", "title", "alt", "className", "style", "width", "height", "errorImgSrc", "onError"]);
31
-
14
+ {
15
+ type = 'cover',
16
+ src,
17
+ shape = 'sharp',
18
+ title = '',
19
+ alt = '',
20
+ className,
21
+ style,
22
+ width = 'auto',
23
+ height = 'auto',
24
+ errorImgSrc,
25
+ onError
26
+ } = _a,
27
+ rest = __rest(_a, ["type", "src", "shape", "title", "alt", "className", "style", "width", "height", "errorImgSrc", "onError"]);
32
28
  const [src2, setSrc2] = useState(src);
33
-
34
29
  const handleImgLoadError = () => {
35
30
  if (errorImgSrc) {
36
31
  setSrc2(props.errorImgSrc);
37
32
  }
38
-
39
33
  props.onError && props.onError();
40
34
  };
41
-
42
35
  const params = Object.assign({
43
36
  type,
44
37
  src: src2,
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/img/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
package/es/index.js CHANGED
@@ -67,7 +67,6 @@ export { default as renderEmpty } from './render-empty';
67
67
  /**
68
68
  * 业务组件
69
69
  */
70
-
71
70
  export { default as TntdLayout } from './tntd-layout';
72
71
  export { default as AuthContext } from './auth-context';
73
72
  export { default as QueryForm } from './query-form';
@@ -1,38 +1,31 @@
1
1
  var __rest = this && this.__rest || function (s, e) {
2
2
  var t = {};
3
-
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
-
6
4
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
5
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
6
  }
9
7
  return t;
10
8
  };
11
-
12
9
  import React, { useState, useEffect } from 'react';
13
10
  import Button from '../button';
14
11
  export default (_a => {
15
12
  var {
16
- loadingText,
17
- loading: pLoading,
18
- onClick,
19
- children
20
- } = _a,
21
- otherProps = __rest(_a, ["loadingText", "loading", "onClick", "children"]);
22
-
13
+ loadingText,
14
+ loading: pLoading,
15
+ onClick,
16
+ children
17
+ } = _a,
18
+ otherProps = __rest(_a, ["loadingText", "loading", "onClick", "children"]);
23
19
  const [loading, setLoading] = useState(pLoading);
24
-
25
20
  const doClick = evt => {
26
21
  if (!loading) {
27
22
  setLoading(true);
28
23
  const returnVal = onClick && onClick(evt, () => setLoading(false));
29
-
30
24
  if (returnVal instanceof Promise) {
31
25
  returnVal.then(() => setLoading(false)).catch(() => setLoading(false));
32
26
  }
33
27
  }
34
28
  };
35
-
36
29
  useEffect(() => {
37
30
  setLoading(pLoading);
38
31
  }, [pLoading]);
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/loading-button/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -1,7 +1,5 @@
1
1
  import _merge from "lodash/merge";
2
2
  import sourceLocale from 'antd/es/locale/default';
3
3
  import zh_CN from './zh_CN';
4
-
5
4
  const defaultLocale = _merge({}, sourceLocale, zh_CN);
6
-
7
5
  export default defaultLocale;
@@ -1,6 +1,5 @@
1
1
  import _merge from "lodash/merge";
2
2
  import sourceLocale from 'antd/es/locale/en_US';
3
-
4
3
  const en_US = _merge({}, sourceLocale, {
5
4
  Table: {
6
5
  loadingDescription: 'loading...',
@@ -29,5 +28,4 @@ const en_US = _merge({}, sourceLocale, {
29
28
  back: 'Back'
30
29
  }
31
30
  });
32
-
33
31
  export default en_US;
@@ -1,6 +1,5 @@
1
1
  import _merge from "lodash/merge";
2
2
  import sourceLocale from 'antd/es/locale/zh_CN';
3
-
4
3
  const zh_CN = _merge({}, sourceLocale, {
5
4
  Table: {
6
5
  loadingDescription: '数据加载中...',
@@ -29,5 +28,4 @@ const zh_CN = _merge({}, sourceLocale, {
29
28
  back: '返回'
30
29
  }
31
30
  });
32
-
33
31
  export default zh_CN;
package/es/modal/index.js CHANGED
@@ -1,5 +1,14 @@
1
- import Modal from 'antd/es/modal';
1
+ /*
2
+ * @Author: 周泽飞 zefei.zhou@tongdun.net
3
+ * @Date: 2023-03-08 16:45:46
4
+ * @LastEditors: 周泽飞 zefei.zhou@tongdun.net
5
+ * @LastEditTime: 2023-03-08 18:33:42
6
+ * @FilePath: /tntd/packages/tntd/src/modal/index.ts
7
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
+ */
9
+ // import Modal from 'antd/es/modal'
2
10
  import 'antd/es/modal/style';
11
+ import { Modal } from './modal';
3
12
  import './modal.less';
4
- export * from 'antd/es/modal';
13
+ export * from './modal';
5
14
  export default Modal;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,eAAe,CAAA;AACjC,OAAO,qBAAqB,CAAA;AAC5B,OAAO,cAAc,CAAA;AAErB,cAAc,eAAe,CAAA;AAE7B,eAAe,KAAK,CAAA","sourcesContent":["import Modal from 'antd/es/modal'\nimport 'antd/es/modal/style'\nimport './modal.less'\n\nexport * from 'antd/es/modal'\n\nexport default Modal\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modal/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,oCAAoC;AACpC,OAAO,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,OAAO,cAAc,CAAA;AAErB,cAAc,SAAS,CAAA;AAEvB,eAAe,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-03-08 16:45:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-03-08 18:33:42\n * @FilePath: /tntd/packages/tntd/src/modal/index.ts\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\n// import Modal from 'antd/es/modal'\nimport 'antd/es/modal/style'\nimport { Modal } from './modal'\n\nimport './modal.less'\n\nexport * from './modal'\n\nexport default Modal\n"]}
@@ -0,0 +1,44 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
8
+ };
9
+ /*
10
+ * @Author: 周泽飞 zefei.zhou@tongdun.net
11
+ * @Date: 2023-03-08 17:45:01
12
+ * @LastEditors: 周泽飞 zefei.zhou@tongdun.net
13
+ * @LastEditTime: 2023-03-08 19:01:48
14
+ * @FilePath: /tntd/packages/tntd/src/modal/modal.tsx
15
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
16
+ */
17
+ import React from 'react';
18
+ import 'antd/es/locale-provider/LocaleReceiver';
19
+ import classNames from 'classnames';
20
+ import { ConfigConsumer } from 'antd/es/config-provider';
21
+ import { default as AntdModal } from 'antd/es/modal';
22
+ export * from 'antd/es/modal';
23
+ export {} from 'antd/es/modal';
24
+ export function Modal(_a) {
25
+ var {
26
+ className
27
+ } = _a,
28
+ rest = __rest(_a, ["className"]);
29
+ return React.createElement(ConfigConsumer, null, ({
30
+ getPrefixCls
31
+ }) => {
32
+ const prefixCls = getPrefixCls('modal');
33
+ return React.createElement(AntdModal, Object.assign({
34
+ className: classNames(prefixCls, 'tntd-modal', className)
35
+ }, rest));
36
+ });
37
+ }
38
+ Modal.info = AntdModal.info;
39
+ Modal.success = AntdModal.success;
40
+ Modal.error = AntdModal.error;
41
+ Modal.warning = AntdModal.warning;
42
+ Modal.warn = AntdModal.warn;
43
+ Modal.confirm = AntdModal.confirm;
44
+ Modal.destroyAll = AntdModal.destroyAll;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.js","sourceRoot":"","sources":["../../src/modal/modal.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAA2B,wCAAwC,CAAA;AAEnE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;AAEpD,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAiD,MAAM,eAAe,CAAA;AAE7E,MAAM,UAAU,KAAK,CAAC,EAAsC;QAAtC,EAAE,SAAS,OAA2B,EAAtB,IAAI,cAApB,aAAsB,CAAF;IACxC,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC,CAAA;QACvC,OAAO,oBAAC,SAAS,kBAAC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,SAAS,CAAC,IAAM,IAAI,EAAI,CAAA;IAC3F,CAAC,CACc,CAClB,CAAA;AACH,CAAC;AAED,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAA;AAC3B,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAA;AACjC,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAA;AAC7B,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAA;AACjC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAA;AAC3B,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAA;AACjC,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-03-08 17:45:01\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-03-08 19:01:48\n * @FilePath: /tntd/packages/tntd/src/modal/modal.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React from 'react'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport type { ModalProps as AntdModalProps } from 'antd/es/modal'\nimport classNames from 'classnames'\nimport { ConfigConsumer } from 'antd/es/config-provider'\n\nimport { default as AntdModal } from 'antd/es/modal'\n\nexport * from 'antd/es/modal'\nexport { ActionButtonProps, ModalProps, ModalFuncProps } from 'antd/es/modal'\n\nexport function Modal({ className, ...rest }: AntdModalProps): JSX.Element {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('modal')\n return <AntdModal className={classNames(prefixCls, 'tntd-modal', className)} {...rest} />\n }}\n </ConfigConsumer>\n )\n}\n\nModal.info = AntdModal.info\nModal.success = AntdModal.success\nModal.error = AntdModal.error\nModal.warning = AntdModal.warning\nModal.warn = AntdModal.warn\nModal.confirm = AntdModal.confirm\nModal.destroyAll = AntdModal.destroyAll\n"]}
@@ -1,35 +1,37 @@
1
1
  @dialog-prefix-cls: ~'@{ant-prefix}-modal';
2
2
  @modal-footer-padding-vertical: 10px;
3
3
  @modal-footer-padding-horizontal: 20px;
4
-
5
- .@{dialog-prefix-cls} {
6
- &-title {
7
- line-height: 20px;
8
- font-weight: normal;
9
- font-size: @font-size-base;
10
- }
11
-
12
- &-close {
13
- color: fade(@text-color, 50%);;
14
- &-x {
15
- height: 40px;
16
- line-height: 40px;
4
+ .tntd-modal{
5
+ &.@{dialog-prefix-cls} {
6
+ .@{dialog-prefix-cls}-title {
7
+ line-height: 20px;
8
+ font-weight: normal;
9
+ font-size: @font-size-base;
17
10
  }
18
- +.@{dialog-prefix-cls}-header{
19
- padding: 10px 30px 10px 20px;
11
+
12
+ .@{dialog-prefix-cls}-close {
13
+ color: fade(@text-color, 50%);;
14
+ &-x {
15
+ height: 40px;
16
+ line-height: 40px;
17
+ }
18
+ +.@{dialog-prefix-cls}-header{
19
+ padding: 10px 30px 10px 20px;
20
+ }
20
21
  }
21
- }
22
22
 
23
- &-header {
24
- padding: 10px 20px;
23
+ .@{dialog-prefix-cls}-header {
24
+ padding: 10px 20px;
25
25
 
26
- }
26
+ }
27
27
 
28
28
 
29
- &-footer {
30
- padding: @modal-footer-padding-vertical @modal-footer-padding-horizontal;
31
- button + button {
32
- margin-left: 10px;
33
- }
34
- }
29
+ .@{dialog-prefix-cls}-footer {
30
+ padding: @modal-footer-padding-vertical @modal-footer-padding-horizontal;
31
+ button + button {
32
+ margin-left: 10px;
33
+ }
34
+ }
35
+ }
35
36
  }
37
+
package/es/page/Box.js CHANGED
@@ -1,52 +1,44 @@
1
1
  var __rest = this && this.__rest || function (s, e) {
2
2
  var t = {};
3
-
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
-
6
4
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
5
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
6
  }
9
7
  return t;
10
8
  };
11
-
12
9
  import React from 'react';
13
10
  import { addUnitForValue } from './utils';
14
11
  import Card from '../card';
15
-
16
12
  const Box = _a => {
17
13
  var {
18
- inLayout,
19
- clsPrefix = 'tnt-page',
20
- children,
21
- noPadding = false,
22
- headerHeight,
23
- bordered = false,
24
- bodyStyle = {},
25
- headStyle = {},
26
- height,
27
- size = 'small',
28
- contentTotalMargin = '0px'
29
- } = _a,
30
- restProps = __rest(_a, ["inLayout", "clsPrefix", "children", "noPadding", "headerHeight", "bordered", "bodyStyle", "headStyle", "height", "size", "contentTotalMargin"]);
31
-
14
+ inLayout,
15
+ clsPrefix = 'tnt-page',
16
+ children,
17
+ noPadding = false,
18
+ headerHeight,
19
+ bordered = false,
20
+ bodyStyle = {},
21
+ headStyle = {},
22
+ height,
23
+ size = 'small',
24
+ contentTotalMargin = '0px'
25
+ } = _a,
26
+ restProps = __rest(_a, ["inLayout", "clsPrefix", "children", "noPadding", "headerHeight", "bordered", "bodyStyle", "headStyle", "height", "size", "contentTotalMargin"]);
32
27
  let cardTitleHeight = 0;
33
-
34
28
  if (restProps.title) {
35
29
  // 根据Card的size,计算Card的title的高度值
36
- cardTitleHeight = size === 'small' ? 40 : 60; // 如果Card的自定义高度,Card的title就使用此高度
37
-
30
+ cardTitleHeight = size === 'small' ? 40 : 60;
31
+ // 如果Card的自定义高度,Card的title就使用此高度
38
32
  if (headStyle.hasOwnProperty(height)) {
39
33
  cardTitleHeight = headStyle.height;
40
34
  }
41
- } // 如果设置了noPadding,优先级最高
42
-
43
-
35
+ }
36
+ // 如果设置了noPadding,优先级最高
44
37
  if (noPadding) {
45
38
  bodyStyle.padding = 0;
46
39
  headStyle.padding = 0;
47
- } // 如果传入只有数字,需要默认加px
48
-
49
-
40
+ }
41
+ // 如果传入只有数字,需要默认加px
50
42
  cardTitleHeight = addUnitForValue(cardTitleHeight);
51
43
  const cardBodyHeight = `calc(${height} - ${headerHeight} - ${contentTotalMargin} - ${cardTitleHeight})`;
52
44
  return React.createElement(Card, Object.assign({
@@ -60,5 +52,4 @@ const Box = _a => {
60
52
  headStyle: headStyle
61
53
  }, restProps), children);
62
54
  };
63
-
64
55
  export default Box;
package/es/page/index.js CHANGED
@@ -1,14 +1,11 @@
1
1
  var __rest = this && this.__rest || function (s, e) {
2
2
  var t = {};
3
-
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
-
6
4
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
5
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
6
  }
9
7
  return t;
10
8
  };
11
-
12
9
  import cn from 'classnames';
13
10
  import React from 'react';
14
11
  import Icon from '../tntd-icon';
@@ -16,57 +13,48 @@ import Box from './Box';
16
13
  import { addUnitForValue, computeWidth } from './utils';
17
14
  import './index.less';
18
15
  const clsPrefix = 'tnt-page';
19
-
20
16
  const isPageBox = child => {
21
17
  var _a;
22
-
23
18
  return (child === null || child === void 0 ? void 0 : child.type) === Box || ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.pageBox);
24
19
  };
25
-
26
20
  const PageLayout = _a => {
27
21
  var _b;
28
-
29
22
  var {
30
- height = '100vh',
31
- headerHeight = 50,
32
- children,
33
- title,
34
- goBack,
35
- goBackText,
36
- center,
37
- extra,
38
- size = 'small',
39
- inLayout = false,
40
- className
41
- } = _a,
42
- restProps = __rest(_a, ["height", "headerHeight", "children", "title", "goBack", "goBackText", "center", "extra", "size", "inLayout", "className"]); // 如果传入只有数字,需要默认加px
43
-
44
-
23
+ height = '100vh',
24
+ headerHeight = 50,
25
+ children,
26
+ title,
27
+ goBack,
28
+ goBackText,
29
+ center,
30
+ extra,
31
+ size = 'small',
32
+ inLayout = false,
33
+ className
34
+ } = _a,
35
+ restProps = __rest(_a, ["height", "headerHeight", "children", "title", "goBack", "goBackText", "center", "extra", "size", "inLayout", "className"]);
36
+ // 如果传入只有数字,需要默认加px
45
37
  let computedHeaderHeight = addUnitForValue(headerHeight);
46
- let computedHeight = addUnitForValue(height); // 判断是否有标题栏
47
-
38
+ let computedHeight = addUnitForValue(height);
39
+ // 判断是否有标题栏
48
40
  if (!(title || extra || center)) {
49
41
  computedHeaderHeight = '0px';
50
42
  }
51
-
52
43
  if (inLayout) {
53
44
  computedHeaderHeight = '40px';
54
- } // 计算中间的zIndex,灰色递减,白色递增
55
-
56
-
45
+ }
46
+ // 计算中间的zIndex,灰色递减,白色递增
57
47
  let whiteCols = 0;
58
- let childrenToArray = []; // 计算children type是box的数量
59
-
60
- let boxCount = 0; // 如果children是单个节点,统一转为数组处理计算层级
61
-
48
+ let childrenToArray = [];
49
+ // 计算children type是box的数量
50
+ let boxCount = 0;
51
+ // 如果children是单个节点,统一转为数组处理计算层级
62
52
  console.log('children', children);
63
-
64
53
  if (typeof children === 'object') {
65
54
  childrenToArray = [children];
66
55
  } else if (Array.isArray(children)) {
67
56
  childrenToArray = [...children];
68
57
  }
69
-
70
58
  console.log('React.Children', React.Children);
71
59
  React.Children.map(children, child => {
72
60
  if (isPageBox(child)) {
@@ -120,7 +108,6 @@ const PageLayout = _a => {
120
108
  // console.log("没有type");
121
109
  return React.cloneElement(React.createElement("div", null, child));
122
110
  }
123
-
124
111
  const extraProps = Object.assign({
125
112
  headerHeight: computedHeaderHeight,
126
113
  size,
@@ -128,11 +115,9 @@ const PageLayout = _a => {
128
115
  contentTotalMargin: inLayout ? '32px' : '0px',
129
116
  inLayout
130
117
  }, child.props);
131
-
132
118
  if (!isPageBox(child)) {
133
119
  return React.cloneElement(child, extraProps);
134
120
  }
135
-
136
121
  const {
137
122
  mode = 'gray',
138
123
  width
@@ -149,6 +134,5 @@ const PageLayout = _a => {
149
134
  }, React.cloneElement(child, extraProps));
150
135
  })));
151
136
  };
152
-
153
137
  PageLayout.Box = Box;
154
138
  export default PageLayout;
@@ -0,0 +1 @@
1
+ "use strict";