tntd 2.0.12 → 2.0.13

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 (432) 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 +4 -8
  11. package/es/ellipsis/index.js +14 -25
  12. package/es/ellipsis/style/index.js +1 -0
  13. package/es/ellipsis/style/index.js.map +1 -0
  14. package/es/empty/empty.js +9 -14
  15. package/es/empty/empty.js.map +1 -1
  16. package/es/empty/render-empty.js +22 -0
  17. package/es/empty/render-empty.js.map +1 -0
  18. package/es/empty/style/index.js +2 -0
  19. package/es/empty/style/index.js.map +1 -0
  20. package/es/handle/index.js +14 -27
  21. package/es/handle/style/index.js +1 -0
  22. package/es/handle/style/index.js.map +1 -0
  23. package/es/icon-list/style/index.js +1 -0
  24. package/es/icon-list/style/index.js.map +1 -0
  25. package/es/img/Contain.js +13 -19
  26. package/es/img/Cover.js +13 -24
  27. package/es/img/index.js +14 -21
  28. package/es/img/style/index.js +1 -0
  29. package/es/img/style/index.js.map +1 -0
  30. package/es/index.js +0 -1
  31. package/es/loading-button/index.js +6 -13
  32. package/es/loading-button/style/index.js +1 -0
  33. package/es/loading-button/style/index.js.map +1 -0
  34. package/es/locale/default.js +0 -2
  35. package/es/locale/en_US.js +0 -2
  36. package/es/locale/zh_CN.js +0 -2
  37. package/es/page/Box.js +19 -28
  38. package/es/page/index.js +22 -38
  39. package/es/page/style/index.js +1 -0
  40. package/es/page/style/index.js.map +1 -0
  41. package/es/page/utils.js +0 -5
  42. package/es/prev-locale.js +0 -3
  43. package/es/query-form/Field/Checkbox.js +4 -8
  44. package/es/query-form/Field/Select.js +10 -17
  45. package/es/query-form/Field/SelectInput.js +4 -18
  46. package/es/query-form/Field/fieldsMap.js +0 -1
  47. package/es/query-form/Field/index.js +2 -11
  48. package/es/query-form/createActions.js +0 -8
  49. package/es/query-form/index.js +2 -34
  50. package/es/query-form/style/index.js +1 -0
  51. package/es/query-form/style/index.js.map +1 -0
  52. package/es/query-list-scene/List.js +18 -39
  53. package/es/query-list-scene/QueryForm.js +10 -19
  54. package/es/query-list-scene/QueryListScene.js +0 -2
  55. package/es/query-list-scene/Toolbar.js +6 -10
  56. package/es/query-list-scene/createActions.js +0 -3
  57. package/es/query-list-scene/style/index.js +1 -0
  58. package/es/query-list-scene/style/index.js.map +1 -0
  59. package/es/render-empty/render-empty.js +0 -2
  60. package/es/render-empty/style/index.js +1 -0
  61. package/es/render-empty/style/index.js.map +1 -0
  62. package/es/steps/steps.js +9 -17
  63. package/es/svg-components/illustration-403.js +0 -2
  64. package/es/svg-components/illustration-404.js +0 -2
  65. package/es/svg-components/illustration-500.js +0 -2
  66. package/es/svg-components/illustration-empty.js +0 -2
  67. package/es/svg-components/illustration-failure.js +0 -2
  68. package/es/svg-components/illustration-no-access.js +0 -2
  69. package/es/svg-components/illustration-no-chart.js +0 -2
  70. package/es/svg-components/illustration-no-result.js +0 -2
  71. package/es/svg-components/illustration-offline.js +0 -2
  72. package/es/svg-components/illustration-success.js +0 -2
  73. package/es/table/assets/image-loading-background.js +0 -2
  74. package/es/table/assets/image-loading.js +0 -2
  75. package/es/table/hooks/use-column-setting.js +0 -1
  76. package/es/table/style/index.js +2 -0
  77. package/es/table/style/index.js.map +1 -0
  78. package/es/table/table.js +14 -19
  79. package/es/table/table.stories.js +0 -2
  80. package/es/table/utils.js +2 -6
  81. package/es/title/index.js +10 -14
  82. package/es/title/style/index.js +1 -0
  83. package/es/title/style/index.js.map +1 -0
  84. package/es/tntd-cascader/AntdCascader/component/context.js +2 -4
  85. package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +0 -2
  86. package/es/tntd-cascader/AntdCascader/component/getIcons.js +6 -15
  87. package/es/tntd-cascader/AntdCascader/config/utils.js +0 -2
  88. package/es/tntd-cascader/AntdCascader/config/warning.js +4 -8
  89. package/es/tntd-cascader/AntdCascader/index.js +51 -73
  90. package/es/tntd-cascader/rc-cascader/Cascader.js +86 -113
  91. package/es/tntd-cascader/rc-cascader/OptionList/Column.js +16 -26
  92. package/es/tntd-cascader/rc-cascader/OptionList/index.js +26 -43
  93. package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -7
  94. package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +12 -41
  95. package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +4 -10
  96. package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +2 -4
  97. package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +0 -1
  98. package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +0 -1
  99. package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +2 -7
  100. package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +8 -15
  101. package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +2 -6
  102. package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +2 -4
  103. package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +2 -7
  104. package/es/tntd-icon/fonts/iconfont.js +7 -12
  105. package/es/tntd-icon/index.js +5 -9
  106. package/es/tntd-icon/style/index.js +1 -0
  107. package/es/tntd-icon/style/index.js.map +1 -0
  108. package/es/tntd-layout/ActionsContext.js +2 -2
  109. package/es/tntd-layout/AppList.js +2 -14
  110. package/es/tntd-layout/Application.js +0 -4
  111. package/es/tntd-layout/Avatar.js +0 -4
  112. package/es/tntd-layout/CompatibleLanguage.js +0 -13
  113. package/es/tntd-layout/EnterpriseLayout/Avatar.js +0 -4
  114. package/es/tntd-layout/EnterpriseLayout/Language.js +0 -6
  115. package/es/tntd-layout/EnterpriseLayout/Theme.js +0 -4
  116. package/es/tntd-layout/EnterpriseLayout/index.js +2 -2
  117. package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +2 -33
  118. package/es/tntd-layout/GlobalNavigation/index.js +0 -6
  119. package/es/tntd-layout/HeaderActions.js +28 -32
  120. package/es/tntd-layout/HeaderNavs.js +6 -14
  121. package/es/tntd-layout/HeaderTabs.js +14 -35
  122. package/es/tntd-layout/Language.js +0 -6
  123. package/es/tntd-layout/Layout.js +2 -7
  124. package/es/tntd-layout/Logo.js +4 -11
  125. package/es/tntd-layout/OrgAppList.js +22 -39
  126. package/es/tntd-layout/SideMenu.js +8 -45
  127. package/es/tntd-layout/Theme.js +0 -6
  128. package/es/tntd-layout/index.js +9 -17
  129. package/es/tntd-layout/paaslayout/CompactSideMenu.js +0 -15
  130. package/es/tntd-layout/paaslayout/SideMenu.js +0 -15
  131. package/es/tntd-layout/paaslayout/index.js +4 -13
  132. package/es/tntd-layout/storage.js +2 -2
  133. package/es/tntd-layout/style/index.js +1 -0
  134. package/es/tntd-layout/style/index.js.map +1 -0
  135. package/es/tntd-modal/index.js +12 -18
  136. package/es/tntd-modal/style/index.js +1 -0
  137. package/es/tntd-modal/style/index.js.map +1 -0
  138. package/es/tntd-second-page/index.js +0 -3
  139. package/es/tntd-select/DropDownWrap.js +4 -8
  140. package/es/tntd-select/index.js +74 -118
  141. package/es/tntd-select/style/index.js +1 -0
  142. package/es/tntd-select/style/index.js.map +1 -0
  143. package/es/utils/checkAuth.js +0 -1
  144. package/es/utils/findMenuInfoByPath.js +0 -3
  145. package/es/utils/index.js +2 -11
  146. package/lib/affix/index.js +4 -10
  147. package/lib/alert/index.js +4 -10
  148. package/lib/anchor/index.js +4 -10
  149. package/lib/array-input/icon.js +1 -7
  150. package/lib/array-input/index.js +41 -91
  151. package/lib/array-input/style/index.d.ts +1 -0
  152. package/lib/array-input/style/index.d.ts.map +1 -0
  153. package/lib/array-input/style/index.js +1 -0
  154. package/lib/array-input/style/index.js.map +1 -0
  155. package/lib/auth-context/index.js +0 -3
  156. package/lib/auth-context/style/index.d.ts +1 -0
  157. package/lib/auth-context/style/index.d.ts.map +1 -0
  158. package/lib/auth-context/style/index.js +1 -0
  159. package/lib/auth-context/style/index.js.map +1 -0
  160. package/lib/auto-complete/index.js +4 -10
  161. package/lib/avatar/index.js +4 -10
  162. package/lib/back-top/index.js +4 -10
  163. package/lib/badge/index.js +4 -10
  164. package/lib/breadcrumb/index.js +4 -10
  165. package/lib/button/index.js +4 -10
  166. package/lib/calendar/index.js +4 -10
  167. package/lib/card/index.js +4 -10
  168. package/lib/carousel/index.js +4 -10
  169. package/lib/cascader/index.js +4 -10
  170. package/lib/checkbox/index.js +4 -10
  171. package/lib/col/index.js +4 -10
  172. package/lib/collapse/index.js +4 -11
  173. package/lib/columns/index.js +14 -28
  174. package/lib/comment/index.js +4 -10
  175. package/lib/config-provider/config-provider.js +0 -2
  176. package/lib/config-provider/index.js +4 -10
  177. package/lib/date-picker/index.js +4 -10
  178. package/lib/descriptions/index.js +4 -10
  179. package/lib/development-login/LoginModal.js +25 -50
  180. package/lib/development-login/index.js +11 -22
  181. package/lib/development-login/style/index.d.ts +1 -0
  182. package/lib/development-login/style/index.d.ts.map +1 -0
  183. package/lib/development-login/style/index.js +1 -0
  184. package/lib/development-login/style/index.js.map +1 -0
  185. package/lib/divider/index.js +4 -10
  186. package/lib/drawer/drawer.js +6 -16
  187. package/lib/drawer/index.js +1 -5
  188. package/lib/dropdown/index.js +4 -10
  189. package/lib/ellipsis/Svg/CopySVG.js +0 -4
  190. package/lib/ellipsis/Svg/TickSVG.js +0 -4
  191. package/lib/ellipsis/index.js +42 -73
  192. package/lib/ellipsis/style/index.d.ts +1 -0
  193. package/lib/ellipsis/style/index.d.ts.map +1 -0
  194. package/lib/ellipsis/style/index.js +1 -0
  195. package/lib/ellipsis/style/index.js.map +1 -0
  196. package/lib/empty/empty.d.ts.map +1 -1
  197. package/lib/empty/empty.js +14 -31
  198. package/lib/empty/empty.js.map +1 -1
  199. package/lib/empty/empty.stories.js +3 -21
  200. package/lib/empty/index.js +1 -5
  201. package/lib/empty/render-empty.d.ts +3 -0
  202. package/lib/empty/render-empty.d.ts.map +1 -0
  203. package/lib/empty/render-empty.js +32 -0
  204. package/lib/empty/render-empty.js.map +1 -0
  205. package/lib/empty/style/index.d.ts +3 -0
  206. package/lib/empty/style/index.d.ts.map +1 -0
  207. package/lib/empty/style/index.js +4 -0
  208. package/lib/empty/style/index.js.map +1 -0
  209. package/lib/exception/exception.js +7 -14
  210. package/lib/exception/index.js +1 -4
  211. package/lib/form/index.js +4 -10
  212. package/lib/handle/index.js +19 -46
  213. package/lib/handle/style/index.d.ts +1 -0
  214. package/lib/handle/style/index.d.ts.map +1 -0
  215. package/lib/handle/style/index.js +1 -0
  216. package/lib/handle/style/index.js.map +1 -0
  217. package/lib/icon/index.js +4 -10
  218. package/lib/icon-list/style/index.d.ts +3 -0
  219. package/lib/icon-list/style/index.d.ts.map +1 -0
  220. package/lib/icon-list/style/index.js +8 -0
  221. package/lib/icon-list/style/index.js.map +1 -0
  222. package/lib/img/Contain.js +12 -23
  223. package/lib/img/Cover.js +31 -53
  224. package/lib/img/index.js +29 -47
  225. package/lib/img/style/index.d.ts +1 -0
  226. package/lib/img/style/index.d.ts.map +1 -0
  227. package/lib/img/style/index.js +1 -0
  228. package/lib/img/style/index.js.map +1 -0
  229. package/lib/index.js +100 -187
  230. package/lib/input/index.js +4 -10
  231. package/lib/input-number/index.js +4 -10
  232. package/lib/layout/index.js +4 -10
  233. package/lib/list/index.js +4 -10
  234. package/lib/loading-button/index.js +15 -32
  235. package/lib/loading-button/style/index.d.ts +1 -0
  236. package/lib/loading-button/style/index.d.ts.map +1 -0
  237. package/lib/loading-button/style/index.js +1 -0
  238. package/lib/loading-button/style/index.js.map +1 -0
  239. package/lib/locale/default.js +0 -5
  240. package/lib/locale/en_US.js +0 -4
  241. package/lib/locale/index.js +3 -6
  242. package/lib/locale/zh_CN.js +0 -4
  243. package/lib/locale-provider/index.js +4 -10
  244. package/lib/mention/index.js +4 -10
  245. package/lib/mentions/index.js +4 -10
  246. package/lib/menu/index.js +4 -10
  247. package/lib/message/index.js +4 -11
  248. package/lib/modal/index.js +4 -11
  249. package/lib/notification/index.js +4 -10
  250. package/lib/page/Box.js +24 -37
  251. package/lib/page/index.js +37 -66
  252. package/lib/page/style/index.d.ts +1 -0
  253. package/lib/page/style/index.d.ts.map +1 -0
  254. package/lib/page/style/index.js +1 -0
  255. package/lib/page/style/index.js.map +1 -0
  256. package/lib/page/utils.js +1 -9
  257. package/lib/page-header/index.js +4 -10
  258. package/lib/pagination/index.js +4 -10
  259. package/lib/popconfirm/index.js +4 -10
  260. package/lib/popover/index.js +4 -10
  261. package/lib/prev-locale.js +1 -10
  262. package/lib/progress/index.js +4 -10
  263. package/lib/query-form/Field/Checkbox.js +2 -11
  264. package/lib/query-form/Field/Select.js +27 -45
  265. package/lib/query-form/Field/SelectInput.js +21 -46
  266. package/lib/query-form/Field/fieldsMap.js +1 -12
  267. package/lib/query-form/Field/index.js +38 -70
  268. package/lib/query-form/createActions.js +0 -7
  269. package/lib/query-form/index.js +52 -121
  270. package/lib/query-form/style/index.d.ts +1 -0
  271. package/lib/query-form/style/index.d.ts.map +1 -0
  272. package/lib/query-form/style/index.js +1 -0
  273. package/lib/query-form/style/index.js.map +1 -0
  274. package/lib/query-form/useForm.js +0 -4
  275. package/lib/query-list-scene/List.js +58 -111
  276. package/lib/query-list-scene/QueryForm.js +37 -67
  277. package/lib/query-list-scene/QueryListScene.js +21 -42
  278. package/lib/query-list-scene/Title.js +1 -5
  279. package/lib/query-list-scene/Toolbar.js +8 -15
  280. package/lib/query-list-scene/createActions.js +0 -6
  281. package/lib/query-list-scene/index.js +0 -10
  282. package/lib/query-list-scene/style/index.d.ts +1 -0
  283. package/lib/query-list-scene/style/index.d.ts.map +1 -0
  284. package/lib/query-list-scene/style/index.js +1 -0
  285. package/lib/query-list-scene/style/index.js.map +1 -0
  286. package/lib/query-list-scene/useActions.js +0 -4
  287. package/lib/radio/index.js +4 -10
  288. package/lib/rate/index.js +4 -10
  289. package/lib/render-empty/index.js +0 -2
  290. package/lib/render-empty/render-empty.js +0 -8
  291. package/lib/render-empty/style/index.d.ts +2 -0
  292. package/lib/render-empty/style/index.d.ts.map +1 -0
  293. package/lib/render-empty/style/index.js +3 -0
  294. package/lib/render-empty/style/index.js.map +1 -0
  295. package/lib/result/index.js +4 -10
  296. package/lib/row/index.js +4 -10
  297. package/lib/select/index.js +4 -10
  298. package/lib/skeleton/index.js +4 -10
  299. package/lib/slider/index.js +4 -10
  300. package/lib/spin/index.js +4 -10
  301. package/lib/statistic/index.js +4 -10
  302. package/lib/steps/index.js +1 -5
  303. package/lib/steps/steps.js +12 -29
  304. package/lib/svg-components/illustration-403.js +3 -9
  305. package/lib/svg-components/illustration-404.js +3 -9
  306. package/lib/svg-components/illustration-500.js +3 -9
  307. package/lib/svg-components/illustration-empty.js +3 -9
  308. package/lib/svg-components/illustration-failure.js +3 -9
  309. package/lib/svg-components/illustration-no-access.js +3 -9
  310. package/lib/svg-components/illustration-no-chart.js +3 -9
  311. package/lib/svg-components/illustration-no-result.js +3 -9
  312. package/lib/svg-components/illustration-offline.js +3 -9
  313. package/lib/svg-components/illustration-success.js +3 -9
  314. package/lib/svg-components/index.js +0 -11
  315. package/lib/switch/index.js +4 -10
  316. package/lib/table/assets/image-loading-background.js +3 -9
  317. package/lib/table/assets/image-loading.js +3 -9
  318. package/lib/table/context.js +0 -2
  319. package/lib/table/hooks/index.js +1 -2
  320. package/lib/table/hooks/use-column-setting.js +8 -16
  321. package/lib/table/index.js +1 -5
  322. package/lib/table/style/index.d.ts +3 -0
  323. package/lib/table/style/index.d.ts.map +1 -0
  324. package/lib/table/style/index.js +4 -0
  325. package/lib/table/style/index.js.map +1 -0
  326. package/lib/table/table.js +34 -63
  327. package/lib/table/table.stories.js +2 -11
  328. package/lib/table/utils.js +2 -11
  329. package/lib/tabs/index.js +4 -10
  330. package/lib/tag/index.js +4 -10
  331. package/lib/time-picker/index.js +4 -10
  332. package/lib/timeline/index.js +4 -10
  333. package/lib/title/index.js +10 -20
  334. package/lib/title/style/index.d.ts +1 -0
  335. package/lib/title/style/index.d.ts.map +1 -0
  336. package/lib/title/style/index.js +1 -0
  337. package/lib/title/style/index.js.map +1 -0
  338. package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +4 -11
  339. package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +3 -8
  340. package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +3 -8
  341. package/lib/tntd-cascader/AntdCascader/component/context.js +3 -9
  342. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +4 -12
  343. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +19 -37
  344. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +8 -17
  345. package/lib/tntd-cascader/AntdCascader/config/utils.js +6 -15
  346. package/lib/tntd-cascader/AntdCascader/config/warning.js +7 -15
  347. package/lib/tntd-cascader/AntdCascader/index.js +80 -133
  348. package/lib/tntd-cascader/AntdCascader/interface.js +0 -3
  349. package/lib/tntd-cascader/index.js +0 -2
  350. package/lib/tntd-cascader/rc-cascader/Cascader.js +123 -188
  351. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +11 -21
  352. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +60 -88
  353. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +65 -109
  354. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +18 -33
  355. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +56 -106
  356. package/lib/tntd-cascader/rc-cascader/context.js +3 -8
  357. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +14 -31
  358. package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +5 -15
  359. package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +3 -11
  360. package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +3 -8
  361. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +3 -15
  362. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +26 -41
  363. package/lib/tntd-cascader/rc-cascader/index.js +0 -3
  364. package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +9 -20
  365. package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +0 -8
  366. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +7 -14
  367. package/lib/tntd-icon/fonts/iconfont.js +7 -12
  368. package/lib/tntd-icon/index.js +6 -17
  369. package/lib/tntd-icon/style/index.d.ts +1 -0
  370. package/lib/tntd-icon/style/index.d.ts.map +1 -0
  371. package/lib/tntd-icon/style/index.js +1 -0
  372. package/lib/tntd-icon/style/index.js.map +1 -0
  373. package/lib/tntd-layout/ActionsContext.js +0 -3
  374. package/lib/tntd-layout/AppList.js +30 -105
  375. package/lib/tntd-layout/Application.js +22 -84
  376. package/lib/tntd-layout/Avatar.js +18 -72
  377. package/lib/tntd-layout/CompatibleLanguage.js +32 -105
  378. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +24 -80
  379. package/lib/tntd-layout/EnterpriseLayout/Language.js +14 -45
  380. package/lib/tntd-layout/EnterpriseLayout/Theme.js +16 -46
  381. package/lib/tntd-layout/EnterpriseLayout/index.js +4 -12
  382. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +45 -174
  383. package/lib/tntd-layout/GlobalNavigation/index.js +19 -70
  384. package/lib/tntd-layout/Header.js +20 -54
  385. package/lib/tntd-layout/HeaderActions.js +33 -64
  386. package/lib/tntd-layout/HeaderNavs.js +19 -59
  387. package/lib/tntd-layout/HeaderTabs.js +43 -111
  388. package/lib/tntd-layout/Iconfont.js +0 -5
  389. package/lib/tntd-layout/Language.js +14 -45
  390. package/lib/tntd-layout/Layout.js +74 -113
  391. package/lib/tntd-layout/Logo.js +14 -41
  392. package/lib/tntd-layout/OrgAppList.js +51 -119
  393. package/lib/tntd-layout/SideMenu.js +42 -120
  394. package/lib/tntd-layout/Theme.js +19 -71
  395. package/lib/tntd-layout/createActions.js +0 -5
  396. package/lib/tntd-layout/images/index.js +0 -28
  397. package/lib/tntd-layout/index.js +21 -49
  398. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +29 -81
  399. package/lib/tntd-layout/paaslayout/Header.js +14 -47
  400. package/lib/tntd-layout/paaslayout/Logo.js +2 -19
  401. package/lib/tntd-layout/paaslayout/SideMenu.js +31 -82
  402. package/lib/tntd-layout/paaslayout/index.js +62 -108
  403. package/lib/tntd-layout/storage.d.ts +1 -1
  404. package/lib/tntd-layout/storage.d.ts.map +1 -1
  405. package/lib/tntd-layout/storage.js +3 -33
  406. package/lib/tntd-layout/style/index.d.ts +1 -0
  407. package/lib/tntd-layout/style/index.d.ts.map +1 -0
  408. package/lib/tntd-layout/style/index.js +1 -0
  409. package/lib/tntd-layout/style/index.js.map +1 -0
  410. package/lib/tntd-modal/index.js +32 -51
  411. package/lib/tntd-modal/style/index.d.ts +1 -0
  412. package/lib/tntd-modal/style/index.d.ts.map +1 -0
  413. package/lib/tntd-modal/style/index.js +1 -0
  414. package/lib/tntd-modal/style/index.js.map +1 -0
  415. package/lib/tntd-second-page/index.js +14 -24
  416. package/lib/tntd-select/DropDownWrap.js +24 -45
  417. package/lib/tntd-select/index.js +117 -206
  418. package/lib/tntd-select/style/index.d.ts +1 -0
  419. package/lib/tntd-select/style/index.d.ts.map +1 -0
  420. package/lib/tntd-select/style/index.js +1 -0
  421. package/lib/tntd-select/style/index.js.map +1 -0
  422. package/lib/tooltip/index.js +4 -10
  423. package/lib/transfer/index.js +4 -10
  424. package/lib/tree/index.js +4 -10
  425. package/lib/tree-select/index.js +4 -10
  426. package/lib/typography/index.js +4 -10
  427. package/lib/upload/index.js +4 -10
  428. package/lib/utils/checkAuth.js +4 -10
  429. package/lib/utils/findMenuInfoByPath.js +1 -7
  430. package/lib/utils/index.js +13 -41
  431. package/lib/version/index.js +4 -10
  432. package/package.json +7 -4
@@ -4,54 +4,44 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _classnames = _interopRequireDefault(require("classnames"));
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
10
  var __rest = void 0 && (void 0).__rest || function (s, e) {
15
11
  var t = {};
16
-
17
12
  for (var p in s) {
18
13
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
19
14
  }
20
-
21
15
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
16
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
23
17
  }
24
18
  return t;
25
19
  };
26
-
27
20
  var _default = function _default(props) {
28
21
  var alt = props.alt,
29
- title = props.title,
30
- src = props.src,
31
- width = props.width,
32
- height = props.height,
33
- _props$style = props.style,
34
- style = _props$style === void 0 ? {} : _props$style,
35
- className = props.className,
36
- onError = props.onError,
37
- shape = props.shape,
38
- errorImgSrc = props.errorImgSrc,
39
- type = props.type,
40
- others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
41
-
22
+ title = props.title,
23
+ src = props.src,
24
+ width = props.width,
25
+ height = props.height,
26
+ _props$style = props.style,
27
+ style = _props$style === void 0 ? {} : _props$style,
28
+ className = props.className,
29
+ onError = props.onError,
30
+ shape = props.shape,
31
+ errorImgSrc = props.errorImgSrc,
32
+ type = props.type,
33
+ others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
42
34
  var styles = Object.assign(Object.assign({}, style), {
43
35
  display: 'inline-block',
44
36
  width: width,
45
37
  height: height,
46
38
  overflow: 'hidden'
47
39
  });
48
-
49
40
  if (shape === 'rounded') {
50
41
  styles.borderRadius = '5px';
51
42
  } else if (shape === 'circle') {
52
43
  styles.borderRadius = '50%';
53
44
  }
54
-
55
45
  var centerStyles = {
56
46
  width: width,
57
47
  height: height,
@@ -79,5 +69,4 @@ var _default = function _default(props) {
79
69
  title: title
80
70
  })));
81
71
  };
82
-
83
72
  exports["default"] = _default;
package/lib/img/Cover.js CHANGED
@@ -1,72 +1,57 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
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); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
-
16
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
17
-
18
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
19
-
20
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
21
-
22
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
23
-
24
- function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
25
-
11
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
14
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
17
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
26
18
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
-
28
19
  var __rest = void 0 && (void 0).__rest || function (s, e) {
29
20
  var t = {};
30
-
31
21
  for (var p in s) {
32
22
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
33
23
  }
34
-
35
24
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
36
25
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
37
26
  }
38
27
  return t;
39
28
  };
40
-
41
29
  var _default = function _default(props) {
42
30
  var alt = props.alt,
43
- title = props.title,
44
- src = props.src,
45
- width = props.width,
46
- height = props.height,
47
- _props$style = props.style,
48
- style = _props$style === void 0 ? {} : _props$style,
49
- className = props.className,
50
- onError = props.onError,
51
- shape = props.shape,
52
- errorImgSrc = props.errorImgSrc,
53
- type = props.type,
54
- others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
55
-
31
+ title = props.title,
32
+ src = props.src,
33
+ width = props.width,
34
+ height = props.height,
35
+ _props$style = props.style,
36
+ style = _props$style === void 0 ? {} : _props$style,
37
+ className = props.className,
38
+ onError = props.onError,
39
+ shape = props.shape,
40
+ errorImgSrc = props.errorImgSrc,
41
+ type = props.type,
42
+ others = __rest(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
56
43
  var imgRef = (0, _react.useRef)();
57
-
58
44
  var _useState = (0, _react.useState)({
59
- display: 'block',
60
- maxWidth: 'none',
61
- width: 'auto',
62
- height: 'auto',
63
- // transition: 'opacity 0.2s ease',
64
- opacity: 0
65
- }),
66
- _useState2 = _slicedToArray(_useState, 2),
67
- imgStyles = _useState2[0],
68
- setImgStyles = _useState2[1];
69
-
45
+ display: 'block',
46
+ maxWidth: 'none',
47
+ width: 'auto',
48
+ height: 'auto',
49
+ // transition: 'opacity 0.2s ease',
50
+ opacity: 0
51
+ }),
52
+ _useState2 = _slicedToArray(_useState, 2),
53
+ imgStyles = _useState2[0],
54
+ setImgStyles = _useState2[1];
70
55
  var getStyles = function getStyles(wrapWidth, wrapHeight, imgWidth, imgHeight) {
71
56
  // 进行等比运算
72
57
  var wrapRatio = wrapWidth / wrapHeight;
@@ -75,7 +60,6 @@ var _default = function _default(props) {
75
60
  var finalHeight = 0;
76
61
  var finalMarginTop = 0;
77
62
  var finalMarginLeft = 0;
78
-
79
63
  if (wrapRatio > imgRatio) {
80
64
  // 父框宽度更大,以父框的宽度为准,拉伸图片上移
81
65
  finalWidth = wrapWidth;
@@ -87,7 +71,6 @@ var _default = function _default(props) {
87
71
  finalWidth = finalHeight * imgRatio;
88
72
  finalMarginLeft = (finalWidth - wrapWidth) / 2 * -1;
89
73
  }
90
-
91
74
  return {
92
75
  height: finalHeight,
93
76
  width: finalWidth,
@@ -95,11 +78,10 @@ var _default = function _default(props) {
95
78
  marginTop: finalMarginTop
96
79
  };
97
80
  };
98
-
99
81
  var imgOnload = function imgOnload() {
100
82
  var imgDOM = imgRef.current;
101
83
  var width = props.width,
102
- height = props.height;
84
+ height = props.height;
103
85
  var imgWidth = imgDOM.width;
104
86
  var imgHeight = imgDOM.height;
105
87
  var imgStyles2 = getStyles(width, height, imgWidth, imgHeight);
@@ -107,7 +89,6 @@ var _default = function _default(props) {
107
89
  opacity: 1
108
90
  }));
109
91
  };
110
-
111
92
  (0, _react.useEffect)(function () {
112
93
  if (width || height) {
113
94
  imgOnload();
@@ -119,13 +100,11 @@ var _default = function _default(props) {
119
100
  width: width,
120
101
  height: height
121
102
  });
122
-
123
103
  if (shape === 'rounded') {
124
104
  styles.borderRadius = '5px';
125
105
  } else if (shape === 'circle') {
126
106
  styles.borderRadius = '50%';
127
107
  }
128
-
129
108
  var cls = (0, _classnames["default"])('tntd-img', shape, className);
130
109
  return _react["default"].createElement("div", Object.assign({
131
110
  className: cls,
@@ -140,5 +119,4 @@ var _default = function _default(props) {
140
119
  onLoad: imgOnload
141
120
  }));
142
121
  };
143
-
144
122
  exports["default"] = _default;
package/lib/img/index.js CHANGED
@@ -1,79 +1,62 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
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); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _Cover = _interopRequireDefault(require("./Cover"));
13
-
14
10
  var _Contain = _interopRequireDefault(require("./Contain"));
15
-
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
-
18
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
19
-
20
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
21
-
22
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
23
-
24
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
25
-
26
- function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
27
-
12
+ 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); }
13
+ 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; }
14
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
+ 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."); }
16
+ 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); }
17
+ 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; }
18
+ 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; } }
28
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
29
-
30
20
  var __rest = void 0 && (void 0).__rest || function (s, e) {
31
21
  var t = {};
32
-
33
22
  for (var p in s) {
34
23
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
35
24
  }
36
-
37
25
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
38
26
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
39
27
  }
40
28
  return t;
41
29
  };
42
-
43
30
  var _default = function _default(props) {
44
31
  var _a = props || {},
45
- _a$type = _a.type,
46
- type = _a$type === void 0 ? 'cover' : _a$type,
47
- src = _a.src,
48
- _a$shape = _a.shape,
49
- shape = _a$shape === void 0 ? 'sharp' : _a$shape,
50
- _a$title = _a.title,
51
- title = _a$title === void 0 ? '' : _a$title,
52
- _a$alt = _a.alt,
53
- alt = _a$alt === void 0 ? '' : _a$alt,
54
- className = _a.className,
55
- style = _a.style,
56
- _a$width = _a.width,
57
- width = _a$width === void 0 ? 'auto' : _a$width,
58
- _a$height = _a.height,
59
- height = _a$height === void 0 ? 'auto' : _a$height,
60
- errorImgSrc = _a.errorImgSrc,
61
- onError = _a.onError,
62
- rest = __rest(_a, ["type", "src", "shape", "title", "alt", "className", "style", "width", "height", "errorImgSrc", "onError"]);
63
-
32
+ _a$type = _a.type,
33
+ type = _a$type === void 0 ? 'cover' : _a$type,
34
+ src = _a.src,
35
+ _a$shape = _a.shape,
36
+ shape = _a$shape === void 0 ? 'sharp' : _a$shape,
37
+ _a$title = _a.title,
38
+ title = _a$title === void 0 ? '' : _a$title,
39
+ _a$alt = _a.alt,
40
+ alt = _a$alt === void 0 ? '' : _a$alt,
41
+ className = _a.className,
42
+ style = _a.style,
43
+ _a$width = _a.width,
44
+ width = _a$width === void 0 ? 'auto' : _a$width,
45
+ _a$height = _a.height,
46
+ height = _a$height === void 0 ? 'auto' : _a$height,
47
+ errorImgSrc = _a.errorImgSrc,
48
+ onError = _a.onError,
49
+ rest = __rest(_a, ["type", "src", "shape", "title", "alt", "className", "style", "width", "height", "errorImgSrc", "onError"]);
64
50
  var _useState = (0, _react.useState)(src),
65
- _useState2 = _slicedToArray(_useState, 2),
66
- src2 = _useState2[0],
67
- setSrc2 = _useState2[1];
68
-
51
+ _useState2 = _slicedToArray(_useState, 2),
52
+ src2 = _useState2[0],
53
+ setSrc2 = _useState2[1];
69
54
  var handleImgLoadError = function handleImgLoadError() {
70
55
  if (errorImgSrc) {
71
56
  setSrc2(props.errorImgSrc);
72
57
  }
73
-
74
58
  props.onError && props.onError();
75
59
  };
76
-
77
60
  var params = Object.assign({
78
61
  type: type,
79
62
  src: src2,
@@ -92,5 +75,4 @@ var _default = function _default(props) {
92
75
  onError: handleImgLoadError
93
76
  })));
94
77
  };
95
-
96
78
  exports["default"] = _default;
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/img/style/index.ts"],"names":[],"mappings":""}
@@ -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":[""]}