tntd 2.8.53 → 2.8.55

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 (1125) hide show
  1. package/es/_util/context.js +16 -11
  2. package/es/_util/defaultRenderEmpty.js +36 -13
  3. package/es/_util/hooks/useFlexGapSupport.js +27 -10
  4. package/es/_util/hooks/useForceUpdate.js +24 -6
  5. package/es/_util/hooks/useScrollLock.js +63 -45
  6. package/es/_util/motion.js +51 -33
  7. package/es/_util/reactNode.js +24 -13
  8. package/es/_util/responsiveObserve.js +68 -56
  9. package/es/_util/styleChecker.js +39 -26
  10. package/es/_util/type.js +18 -3
  11. package/es/_util/warning.js +19 -6
  12. package/es/actions/index.js +32 -11
  13. package/es/affix/index.js +24 -5
  14. package/es/affix/style/index.js +4 -3
  15. package/es/alert/alert.js +147 -0
  16. package/es/alert/alert.js.map +1 -0
  17. package/es/alert/alert.less +128 -0
  18. package/es/alert/index.js +24 -5
  19. package/es/alert/style/index.js +4 -3
  20. package/es/anchor/anchor.js +119 -54
  21. package/es/anchor/index.js +22 -6
  22. package/es/anchor/style/index.js +5 -5
  23. package/es/array-input/index.js +375 -190
  24. package/es/auth-context/index.js +10 -3
  25. package/es/auto-complete/index.js +24 -5
  26. package/es/auto-complete/style/index.js +6 -6
  27. package/es/avatar/index.js +24 -5
  28. package/es/avatar/style/index.js +4 -3
  29. package/es/back-top/index.js +24 -5
  30. package/es/back-top/style/index.js +4 -3
  31. package/es/badge/index.js +24 -5
  32. package/es/badge/style/index.js +4 -3
  33. package/es/breadcrumb/index.js +24 -5
  34. package/es/breadcrumb/style/index.js +6 -5
  35. package/es/button/button.js +51 -26
  36. package/es/button/index.js +22 -6
  37. package/es/button/style/index.js +4 -3
  38. package/es/calendar/index.js +24 -5
  39. package/es/calendar/style/index.js +6 -6
  40. package/es/card/card.js +45 -22
  41. package/es/card/index.js +21 -5
  42. package/es/card/style/index.js +7 -7
  43. package/es/carousel/index.js +24 -5
  44. package/es/carousel/style/index.js +4 -3
  45. package/es/cascader/cascader.js +84 -0
  46. package/es/cascader/cascader.js.map +1 -0
  47. package/es/cascader/cascader.less +16 -0
  48. package/es/cascader/index.js +29 -8
  49. package/es/cascader/style/index.js +6 -6
  50. package/es/check-card/group.js +226 -144
  51. package/es/check-card/index.js +168 -115
  52. package/es/checkbox/check.png +0 -0
  53. package/es/checkbox/checkbox-group.js +12 -6
  54. package/es/checkbox/checkbox.js +100 -0
  55. package/es/checkbox/checkbox.js.map +1 -0
  56. package/es/checkbox/checkbox.less +69 -0
  57. package/es/checkbox/index.js +38 -8
  58. package/es/checkbox/style/index.js +4 -3
  59. package/es/col/index.js +24 -5
  60. package/es/col/style/index.js +4 -5
  61. package/es/collapse/index.js +25 -6
  62. package/es/collapse/style/index.js +4 -3
  63. package/es/color-picker/ColorPicker.js +155 -89
  64. package/es/color-picker/index.js +21 -11
  65. package/es/columns/index.js +78 -35
  66. package/es/columns/style/index.js +1 -2
  67. package/es/comment/index.js +24 -5
  68. package/es/comment/style/index.js +4 -3
  69. package/es/config-provider/DisabledContext.js +19 -7
  70. package/es/config-provider/SizeContext.js +21 -5
  71. package/es/config-provider/config-provider.js +13 -3
  72. package/es/config-provider/index.js +85 -9
  73. package/es/config-provider/index.js.map +1 -1
  74. package/es/config-provider/style/index.js +3 -2
  75. package/es/connect/index.js +42 -24
  76. package/es/date-picker/DatePicker.js +163 -0
  77. package/es/date-picker/DatePicker.js.map +1 -0
  78. package/es/date-picker/index.js +47 -13
  79. package/es/date-picker/index.less +294 -0
  80. package/es/date-picker/style/index.js +7 -8
  81. package/es/descriptions/descriptions.js +140 -73
  82. package/es/descriptions/index.js +22 -6
  83. package/es/descriptions/style/index.js +4 -3
  84. package/es/development-login/LoginModal.js +112 -54
  85. package/es/development-login/index.js +44 -11
  86. package/es/divider/index.js +24 -5
  87. package/es/divider/style/index.js +4 -3
  88. package/es/drawer/drawer.js +144 -73
  89. package/es/drawer/index.js +23 -6
  90. package/es/drawer/style/index.js +4 -4
  91. package/es/dropdown/index.js +24 -5
  92. package/es/dropdown/style/index.js +5 -5
  93. package/es/ellipsis/Svg/CopySVG.js +71 -17
  94. package/es/ellipsis/Svg/TickSVG.js +49 -12
  95. package/es/ellipsis/index.js +191 -119
  96. package/es/empty/empty.js +89 -57
  97. package/es/empty/empty.stories.js +20 -14
  98. package/es/empty/index.js +22 -6
  99. package/es/empty/style/index.js +4 -3
  100. package/es/exception/exception.js +46 -25
  101. package/es/exception/index.js +21 -5
  102. package/es/form/form.js +95 -58
  103. package/es/form/index.js +21 -5
  104. package/es/form/style/index.js +5 -5
  105. package/es/grid/index.js +24 -5
  106. package/es/grid/style/index.js +4 -3
  107. package/es/grid-v4/RowContext.js +9 -4
  108. package/es/grid-v4/col.js +92 -70
  109. package/es/grid-v4/hooks/useBreakpoint.js +27 -18
  110. package/es/grid-v4/index.js +27 -10
  111. package/es/grid-v4/row.js +174 -132
  112. package/es/grid-v4/style/index.js +3 -3
  113. package/es/handle/index.js +166 -103
  114. package/es/handle-icon/index.js +225 -156
  115. package/es/icon/IconFont.js +58 -50
  116. package/es/icon/components/Icon.js +130 -75
  117. package/es/icon/components/index.js +13 -2
  118. package/es/icon/components/utils.js +107 -68
  119. package/es/icon/index.js +118 -91
  120. package/es/icon/style/index.js +5 -4
  121. package/es/icon/twoTonePrimaryColor.js +17 -10
  122. package/es/icon/utils.js +68 -63
  123. package/es/icon-list/index.js +7 -120
  124. package/es/icon-old/index.js +24 -5
  125. package/es/icon-old/style/index.js +4 -3
  126. package/es/img/Contain.js +68 -41
  127. package/es/img/Cover.js +116 -75
  128. package/es/img/index.js +74 -35
  129. package/es/index.js +748 -113
  130. package/es/index.js.map +1 -1
  131. package/es/input/index.js +22 -6
  132. package/es/input/input.js +106 -61
  133. package/es/input/style/index.js +5 -5
  134. package/es/input-number/index.js +50 -26
  135. package/es/input-number/inputNumber.js +89 -0
  136. package/es/input-number/inputNumber.js.map +1 -0
  137. package/es/input-number/inputNumber.less +12 -0
  138. package/es/input-number/style/index.js +4 -3
  139. package/es/label/index.js +131 -111
  140. package/es/layout/index.js +24 -5
  141. package/es/layout/style/index.js +4 -3
  142. package/es/list/index.js +24 -5
  143. package/es/list/style/index.js +8 -8
  144. package/es/loading-button/index.js +58 -30
  145. package/es/locale/default.js +12 -6
  146. package/es/locale/en_US.js +81 -74
  147. package/es/locale/index.js +38 -4
  148. package/es/locale/zh_CN.js +73 -67
  149. package/es/locale-provider/index.js +27 -8
  150. package/es/locale-provider/style/index.js +3 -2
  151. package/es/mentions/index.js +24 -5
  152. package/es/mentions/style/index.js +5 -5
  153. package/es/menu/index.js +24 -5
  154. package/es/menu/style/index.js +5 -6
  155. package/es/message/index.js +25 -6
  156. package/es/message/style/index.js +4 -3
  157. package/es/modal/index.js +22 -6
  158. package/es/modal/index.less +36 -0
  159. package/es/modal/modal.js +97 -36
  160. package/es/modal/style/index.js +5 -5
  161. package/es/notification/assets/index.js +20 -3
  162. package/es/notification/assets/svg-error-tip.js +152 -33
  163. package/es/notification/assets/svg-success-tip.js +169 -37
  164. package/es/notification/index.js +23 -5
  165. package/es/notification/notification.js +104 -23
  166. package/es/notification/style/index.js +4 -3
  167. package/es/page/Box.js +64 -36
  168. package/es/page/index.js +145 -92
  169. package/es/page/utils.js +22 -14
  170. package/es/page-container/index.js +22 -10
  171. package/es/page-header/index.js +24 -5
  172. package/es/page-header/style/index.js +5 -5
  173. package/es/page-loading/index.js +33 -24
  174. package/es/page-loading/loading.gif +0 -0
  175. package/es/pagination/index.js +24 -5
  176. package/es/pagination/style/index.js +5 -5
  177. package/es/popconfirm/index.js +24 -5
  178. package/es/popconfirm/index.less +32 -0
  179. package/es/popconfirm/popconfirm.js +96 -0
  180. package/es/popconfirm/popconfirm.js.map +1 -0
  181. package/es/popconfirm/style/index.js +5 -6
  182. package/es/popover/index.js +24 -5
  183. package/es/popover/index.less +57 -0
  184. package/es/popover/popover.js +90 -0
  185. package/es/popover/popover.js.map +1 -0
  186. package/es/popover/style/index.js +4 -5
  187. package/es/prev-locale.js +195 -131
  188. package/es/prev-locale.js.map +1 -1
  189. package/es/preview-text/index.js +264 -183
  190. package/es/progress/index.js +24 -5
  191. package/es/progress/progress.js +179 -0
  192. package/es/progress/progress.js.map +1 -0
  193. package/es/progress/progress.less +82 -0
  194. package/es/progress/style/index.js +4 -3
  195. package/es/query-form/Field/Checkbox.js +27 -19
  196. package/es/query-form/Field/Select.js +79 -43
  197. package/es/query-form/Field/SelectInput.js +98 -51
  198. package/es/query-form/Field/fieldsMap.js +52 -47
  199. package/es/query-form/Field/index.js +142 -70
  200. package/es/query-form/createActions.js +54 -47
  201. package/es/query-form/index.js +377 -261
  202. package/es/query-form/useForm.js +13 -7
  203. package/es/query-form-backup/Field/Composition/FieldPopover.less +35 -0
  204. package/es/query-form-backup/Field/Composition/index.less +114 -0
  205. package/es/query-form-backup/index.less +90 -0
  206. package/es/query-list-scene/List.js +357 -262
  207. package/es/query-list-scene/QueryForm.js +157 -98
  208. package/es/query-list-scene/QueryListScene.js +63 -26
  209. package/es/query-list-scene/Title.js +15 -5
  210. package/es/query-list-scene/Toolbar.js +30 -17
  211. package/es/query-list-scene/createActions.js +80 -61
  212. package/es/query-list-scene/index.js +26 -20
  213. package/es/query-list-scene/useActions.js +13 -7
  214. package/es/radio/index.js +27 -7
  215. package/es/radio/radio-group.js +12 -6
  216. package/es/radio/radio.js +110 -0
  217. package/es/radio/radio.js.map +1 -0
  218. package/es/radio/radio.less +43 -0
  219. package/es/radio/style/index.js +4 -3
  220. package/es/rate/index.js +24 -5
  221. package/es/rate/style/index.js +5 -5
  222. package/es/render-empty/index.js +8 -3
  223. package/es/render-empty/render-empty.js +29 -17
  224. package/es/result/index.js +24 -5
  225. package/es/result/style/index.js +4 -3
  226. package/es/row/index.js +24 -5
  227. package/es/row/style/index.js +4 -5
  228. package/es/scroll-bar/Bar.js +90 -47
  229. package/es/scroll-bar/Context.js +12 -6
  230. package/es/scroll-bar/ScrollBar.js +91 -62
  231. package/es/scroll-bar/Thumb.js +125 -108
  232. package/es/scroll-bar/index.js +10 -4
  233. package/es/scroll-bar/util.js +38 -27
  234. package/es/segmented/index.js +69 -43
  235. package/es/select/index.js +23 -6
  236. package/es/select/select.js +64 -39
  237. package/es/select/style/index.js +5 -5
  238. package/es/skeleton/index.js +24 -5
  239. package/es/skeleton/style/index.js +4 -3
  240. package/es/slider/index.js +24 -5
  241. package/es/slider/style/index.js +5 -5
  242. package/es/spin/index.js +24 -5
  243. package/es/spin/spin.js +79 -0
  244. package/es/spin/spin.js.map +1 -0
  245. package/es/spin/spin.less +9 -0
  246. package/es/spin/style/index.js +4 -3
  247. package/es/statistic/index.js +24 -5
  248. package/es/statistic/style/index.js +4 -3
  249. package/es/steps/assets/background_left.svg +12 -0
  250. package/es/steps/assets/background_right.svg +12 -0
  251. package/es/steps/assets/horizontal_line.svg +3 -0
  252. package/es/steps/assets/vertical_line.svg +3 -0
  253. package/es/steps/index.js +23 -7
  254. package/es/steps/stepStyle/icon.less +51 -0
  255. package/es/steps/stepStyle/progress-dot.less +10 -0
  256. package/es/steps/stepStyle/variables.less +8 -0
  257. package/es/steps/stepStyle/vertical.less +41 -0
  258. package/es/steps/steps.js +72 -45
  259. package/es/steps/style/index.js +4 -3
  260. package/es/style/index.js +3 -2
  261. package/es/style/v2-compatible-reset.js +3 -2
  262. package/es/svg-components/illustration-403.js +218 -61
  263. package/es/svg-components/illustration-404.js +302 -78
  264. package/es/svg-components/illustration-500.js +333 -86
  265. package/es/svg-components/illustration-empty.js +66 -18
  266. package/es/svg-components/illustration-failure.js +124 -39
  267. package/es/svg-components/illustration-no-access.js +126 -38
  268. package/es/svg-components/illustration-no-chart.js +146 -40
  269. package/es/svg-components/illustration-no-result.js +104 -35
  270. package/es/svg-components/illustration-offline.js +179 -41
  271. package/es/svg-components/illustration-success.js +149 -46
  272. package/es/svg-components/index.js +76 -11
  273. package/es/switch/index.js +23 -4
  274. package/es/switch/index.less +45 -0
  275. package/es/switch/style/index.js +4 -3
  276. package/es/switch/switch.js +34 -8
  277. package/es/table/assets/image-loading-background.js +57 -20
  278. package/es/table/assets/image-loading.js +38 -8
  279. package/es/table/constants.js +7 -2
  280. package/es/table/context.js +8 -3
  281. package/es/table/hooks/index.js +27 -3
  282. package/es/table/hooks/use-column-setting.js +39 -19
  283. package/es/table/hooks/use-expand-fixed.js +106 -82
  284. package/es/table/index.js +23 -7
  285. package/es/table/resizableTable/index.js +139 -78
  286. package/es/table/style/index.js +10 -11
  287. package/es/table/table-hoc.js +28 -24
  288. package/es/table/table.js +242 -181
  289. package/es/table/table.stories.js +586 -366
  290. package/es/table/total-shower.js +16 -6
  291. package/es/table/utils.js +37 -56
  292. package/es/table-container/index.js +21 -9
  293. package/es/tabs/index.js +21 -5
  294. package/es/tabs/style/index.js +4 -3
  295. package/es/tabs/tabPane.js +1 -2
  296. package/es/tabs/tabs.js +66 -35
  297. package/es/tabs/tabs.less +125 -0
  298. package/es/tabs-container/index.js +22 -10
  299. package/es/tag/index.js +22 -6
  300. package/es/tag/style/index.js +4 -3
  301. package/es/tag/tag.js +165 -123
  302. package/es/time-picker/TimePicker.js +90 -0
  303. package/es/time-picker/TimePicker.js.map +1 -0
  304. package/es/time-picker/index.js +26 -7
  305. package/es/time-picker/index.less +38 -0
  306. package/es/time-picker/style/index.js +4 -3
  307. package/es/timeline/index.js +24 -5
  308. package/es/timeline/style/index.js +4 -3
  309. package/es/title/index.js +62 -28
  310. package/es/tntd-action/Action.js +218 -0
  311. package/es/tntd-action/Action.js.map +1 -0
  312. package/es/tntd-action/index.js +11 -5
  313. package/es/tntd-action/index.less +70 -0
  314. package/es/tntd-action_backup/index.less +114 -0
  315. package/es/tntd-cascader/AntdCascader/component/DisabledContext.js +19 -7
  316. package/es/tntd-cascader/AntdCascader/component/FormItemInputContext.js +11 -3
  317. package/es/tntd-cascader/AntdCascader/component/SizeContext.js +11 -3
  318. package/es/tntd-cascader/AntdCascader/component/context.js +16 -11
  319. package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +31 -13
  320. package/es/tntd-cascader/AntdCascader/component/getIcons.js +79 -51
  321. package/es/tntd-cascader/AntdCascader/component/useCompactItemContext.js +32 -24
  322. package/es/tntd-cascader/AntdCascader/config/utils.js +29 -21
  323. package/es/tntd-cascader/AntdCascader/config/warning.js +20 -12
  324. package/es/tntd-cascader/AntdCascader/index.js +214 -136
  325. package/es/tntd-cascader/AntdCascader/interface.js +15 -5
  326. package/es/tntd-cascader/index.js +13 -2
  327. package/es/tntd-cascader/rc-cascader/Cascader.js +330 -262
  328. package/es/tntd-cascader/rc-cascader/OptionList/Checkbox.js +31 -14
  329. package/es/tntd-cascader/rc-cascader/OptionList/Column.js +216 -140
  330. package/es/tntd-cascader/rc-cascader/OptionList/index.js +225 -138
  331. package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +41 -23
  332. package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +180 -141
  333. package/es/tntd-cascader/rc-cascader/context.js +13 -4
  334. package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +64 -41
  335. package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +41 -27
  336. package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +28 -19
  337. package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +19 -10
  338. package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +33 -25
  339. package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +76 -43
  340. package/es/tntd-cascader/rc-cascader/index.js +9 -3
  341. package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +53 -36
  342. package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +44 -36
  343. package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +35 -25
  344. package/es/tntd-checkbox-select/index.js +249 -143
  345. package/es/tntd-form/ErrorList.js +101 -50
  346. package/es/tntd-form/Form.js +168 -110
  347. package/es/tntd-form/FormItem/ItemHolder.js +149 -126
  348. package/es/tntd-form/FormItem/index.js +289 -226
  349. package/es/tntd-form/FormItemInput.js +89 -36
  350. package/es/tntd-form/FormItemLabel.js +99 -70
  351. package/es/tntd-form/FormList.js +51 -32
  352. package/es/tntd-form/context.js +46 -32
  353. package/es/tntd-form/hooks/useDebounce.js +31 -14
  354. package/es/tntd-form/hooks/useForm.js +59 -31
  355. package/es/tntd-form/hooks/useFormInstance.js +13 -7
  356. package/es/tntd-form/hooks/useFormItemStatus.js +18 -9
  357. package/es/tntd-form/hooks/useFrameState.js +55 -37
  358. package/es/tntd-form/hooks/useItemRef.js +27 -18
  359. package/es/tntd-form/index.js +26 -17
  360. package/es/tntd-form/interface.js +7 -3
  361. package/es/tntd-form/style/index.js +6 -6
  362. package/es/tntd-form/util.js +21 -17
  363. package/es/tntd-form/validateMessagesContext.js +8 -3
  364. package/es/tntd-icon/fonts/iconfont.js +36 -53
  365. package/es/tntd-icon/index.js +40 -21
  366. package/es/tntd-layout/ActionsContext.js +8 -3
  367. package/es/tntd-layout/AppList.js +175 -199
  368. package/es/tntd-layout/Application.js +77 -86
  369. package/es/tntd-layout/Avatar.js +102 -110
  370. package/es/tntd-layout/CompatibleLanguage.js +130 -155
  371. package/es/tntd-layout/EnterpriseLayout/Avatar.js +118 -120
  372. package/es/tntd-layout/EnterpriseLayout/Language.js +74 -64
  373. package/es/tntd-layout/EnterpriseLayout/Theme.js +72 -78
  374. package/es/tntd-layout/EnterpriseLayout/index.js +28 -13
  375. package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +285 -251
  376. package/es/tntd-layout/GlobalNavigation/index.js +110 -90
  377. package/es/tntd-layout/Header.js +78 -106
  378. package/es/tntd-layout/HeaderActions.js +106 -81
  379. package/es/tntd-layout/HeaderNavs.js +76 -80
  380. package/es/tntd-layout/HeaderTabs.js +222 -289
  381. package/es/tntd-layout/Iconfont.js +12 -4
  382. package/es/tntd-layout/Language.js +71 -51
  383. package/es/tntd-layout/Layout.js +216 -146
  384. package/es/tntd-layout/Logo.js +71 -115
  385. package/es/tntd-layout/OrgAppList.js +240 -363
  386. package/es/tntd-layout/SideMenu.js +269 -383
  387. package/es/tntd-layout/Theme.js +77 -68
  388. package/es/tntd-layout/createActions.js +46 -31
  389. package/es/tntd-layout/images/index.js +67 -62
  390. package/es/tntd-layout/index.js +135 -77
  391. package/es/tntd-layout/paaslayout/CompactSideMenu.js +132 -156
  392. package/es/tntd-layout/paaslayout/Header.js +53 -50
  393. package/es/tntd-layout/paaslayout/Logo.js +16 -23
  394. package/es/tntd-layout/paaslayout/SideMenu.js +132 -121
  395. package/es/tntd-layout/paaslayout/index.js +208 -117
  396. package/es/tntd-layout/storage.js +58 -24
  397. package/es/tntd-modal/index.js +97 -37
  398. package/es/tntd-rc-select/_util/DisabledContext.js +19 -7
  399. package/es/tntd-rc-select/_util/FormItemInputContext.js +11 -3
  400. package/es/tntd-rc-select/_util/PurePanel.js +87 -52
  401. package/es/tntd-rc-select/_util/SizeContext.js +11 -3
  402. package/es/tntd-rc-select/_util/context.js +16 -11
  403. package/es/tntd-rc-select/_util/defaultRenderEmpty.js +36 -13
  404. package/es/tntd-rc-select/_util/getIcons.js +82 -51
  405. package/es/tntd-rc-select/_util/interface.js +15 -5
  406. package/es/tntd-rc-select/_util/motion.js +51 -33
  407. package/es/tntd-rc-select/_util/type.js +18 -3
  408. package/es/tntd-rc-select/_util/useCompactItemContext.js +32 -24
  409. package/es/tntd-rc-select/_util/warning.js +20 -12
  410. package/es/tntd-rc-select/index.js +153 -98
  411. package/es/tntd-reference/AHref/index.js +43 -34
  412. package/es/tntd-reference/ReferenceBatchCheck/index.js +164 -96
  413. package/es/tntd-reference/ReferenceBatchDrawer/index.js +124 -58
  414. package/es/tntd-reference/ReferenceCheck/index.js +125 -71
  415. package/es/tntd-reference/ReferenceDrawer/index.js +91 -43
  416. package/es/tntd-reference/ReferenceInfo/index.js +161 -91
  417. package/es/tntd-reference/index.js +20 -14
  418. package/es/tntd-second-page/index.js +62 -29
  419. package/es/tntd-select/DropDownWrap.js +101 -54
  420. package/es/tntd-select/index.js +652 -523
  421. package/es/tntd-select/index.less +7 -0
  422. package/es/tntd-virtual-tree/index.js +307 -199
  423. package/es/tntd-virtual-tree/utils.js +264 -184
  424. package/es/tntd-virtual-tree-select/index.js +206 -125
  425. package/es/tntd-virtual-tree-select/utils.js +69 -40
  426. package/es/tooltip/index.js +25 -6
  427. package/es/tooltip/style/index.js +4 -3
  428. package/es/tooltip/tooltip.js +64 -34
  429. package/es/transfer/index.js +24 -5
  430. package/es/transfer/style/index.js +8 -8
  431. package/es/tree/index.js +24 -5
  432. package/es/tree/style/index.js +4 -3
  433. package/es/tree-select/index.js +30 -9
  434. package/es/tree-select/style/index.js +6 -7
  435. package/es/typography/index.js +24 -5
  436. package/es/typography/style/index.js +6 -6
  437. package/es/upload/index.js +220 -116
  438. package/es/upload/style/index.js +6 -6
  439. package/es/upload/svg/UploadSVG.js +44 -14
  440. package/es/utils/checkAuth.js +34 -21
  441. package/es/utils/findMenuInfoByPath.js +41 -32
  442. package/es/utils/index.js +149 -71
  443. package/es/utils/lang.js +78 -118
  444. package/es/utils/simple-template.js +12 -4
  445. package/es/version/index.js +24 -5
  446. package/es/version/style/index.js +3 -3
  447. package/es/water-mark/index.js +131 -90
  448. package/lib/_util/context.js +19 -16
  449. package/lib/_util/defaultRenderEmpty.js +69 -39
  450. package/lib/_util/defaultRenderEmpty.js.map +1 -1
  451. package/lib/_util/hooks/useFlexGapSupport.js +98 -33
  452. package/lib/_util/hooks/useForceUpdate.js +94 -29
  453. package/lib/_util/hooks/useScrollLock.js +104 -46
  454. package/lib/_util/motion.js +50 -36
  455. package/lib/_util/reactNode.js +50 -37
  456. package/lib/_util/responsiveObserve.js +94 -58
  457. package/lib/_util/styleChecker.js +41 -32
  458. package/lib/_util/type.js +16 -6
  459. package/lib/_util/warning.js +48 -30
  460. package/lib/actions/index.js +34 -14
  461. package/lib/affix/index.d.ts +2 -2
  462. package/lib/affix/index.js +52 -21
  463. package/lib/affix/index.js.map +1 -1
  464. package/lib/affix/style/index.js +2 -3
  465. package/lib/alert/alert.d.ts +12 -0
  466. package/lib/alert/alert.d.ts.map +1 -0
  467. package/lib/alert/alert.js +147 -0
  468. package/lib/alert/alert.js.map +1 -0
  469. package/lib/alert/alert.less +128 -0
  470. package/lib/alert/index.d.ts +2 -2
  471. package/lib/alert/index.js +52 -21
  472. package/lib/alert/index.js.map +1 -1
  473. package/lib/alert/style/index.js +2 -3
  474. package/lib/anchor/anchor.d.ts +4 -4
  475. package/lib/anchor/anchor.js +194 -84
  476. package/lib/anchor/anchor.js.map +1 -1
  477. package/lib/anchor/index.js +19 -19
  478. package/lib/anchor/style/index.js +2 -4
  479. package/lib/array-input/index.js +475 -215
  480. package/lib/array-input/index.js.map +1 -1
  481. package/lib/auth-context/index.js +9 -4
  482. package/lib/auto-complete/index.d.ts +2 -2
  483. package/lib/auto-complete/index.js +52 -21
  484. package/lib/auto-complete/index.js.map +1 -1
  485. package/lib/auto-complete/style/index.js +2 -4
  486. package/lib/avatar/index.d.ts +2 -2
  487. package/lib/avatar/index.js +52 -21
  488. package/lib/avatar/index.js.map +1 -1
  489. package/lib/avatar/style/index.js +2 -3
  490. package/lib/back-top/index.d.ts +2 -2
  491. package/lib/back-top/index.js +52 -21
  492. package/lib/back-top/index.js.map +1 -1
  493. package/lib/back-top/style/index.js +2 -3
  494. package/lib/badge/index.d.ts +2 -2
  495. package/lib/badge/index.js +52 -21
  496. package/lib/badge/index.js.map +1 -1
  497. package/lib/badge/style/index.js +2 -3
  498. package/lib/breadcrumb/index.d.ts +2 -2
  499. package/lib/breadcrumb/index.js +52 -21
  500. package/lib/breadcrumb/index.js.map +1 -1
  501. package/lib/breadcrumb/style/index.js +2 -3
  502. package/lib/button/button.d.ts +4 -4
  503. package/lib/button/button.js +79 -55
  504. package/lib/button/button.js.map +1 -1
  505. package/lib/button/index.js +19 -19
  506. package/lib/button/style/index.js +2 -3
  507. package/lib/calendar/index.d.ts +2 -2
  508. package/lib/calendar/index.js +52 -21
  509. package/lib/calendar/index.js.map +1 -1
  510. package/lib/calendar/style/index.js +2 -4
  511. package/lib/card/card.d.ts +3 -3
  512. package/lib/card/card.js +73 -51
  513. package/lib/card/card.js.map +1 -1
  514. package/lib/card/index.js +19 -19
  515. package/lib/card/style/index.js +2 -4
  516. package/lib/carousel/index.d.ts +2 -2
  517. package/lib/carousel/index.js +52 -21
  518. package/lib/carousel/index.js.map +1 -1
  519. package/lib/carousel/style/index.js +2 -3
  520. package/lib/cascader/cascader.d.ts +10 -0
  521. package/lib/cascader/cascader.d.ts.map +1 -0
  522. package/lib/cascader/cascader.js +84 -0
  523. package/lib/cascader/cascader.js.map +1 -0
  524. package/lib/cascader/cascader.less +16 -0
  525. package/lib/cascader/index.d.ts +2 -2
  526. package/lib/cascader/index.js +57 -25
  527. package/lib/cascader/index.js.map +1 -1
  528. package/lib/cascader/style/index.js +2 -4
  529. package/lib/check-card/group.js +309 -172
  530. package/lib/check-card/index.js +262 -141
  531. package/lib/checkbox/check.png +0 -0
  532. package/lib/checkbox/checkbox-group.d.ts +1 -1
  533. package/lib/checkbox/checkbox-group.js +14 -9
  534. package/lib/checkbox/checkbox-group.js.map +1 -1
  535. package/lib/checkbox/checkbox.d.ts +16 -0
  536. package/lib/checkbox/checkbox.d.ts.map +1 -0
  537. package/lib/checkbox/checkbox.js +100 -0
  538. package/lib/checkbox/checkbox.js.map +1 -0
  539. package/lib/checkbox/checkbox.less +69 -0
  540. package/lib/checkbox/index.d.ts +2 -2
  541. package/lib/checkbox/index.js +66 -24
  542. package/lib/checkbox/index.js.map +1 -1
  543. package/lib/checkbox/style/index.js +2 -3
  544. package/lib/col/index.d.ts +2 -2
  545. package/lib/col/index.js +52 -21
  546. package/lib/col/index.js.map +1 -1
  547. package/lib/col/style/index.js +2 -5
  548. package/lib/collapse/index.d.ts +2 -2
  549. package/lib/collapse/index.js +54 -23
  550. package/lib/collapse/index.js.map +1 -1
  551. package/lib/collapse/style/index.js +2 -3
  552. package/lib/color-picker/ColorPicker.js +248 -115
  553. package/lib/color-picker/index.js +21 -13
  554. package/lib/color-picker/index.js.map +1 -1
  555. package/lib/columns/index.js +82 -42
  556. package/lib/columns/style/index.js +1 -2
  557. package/lib/comment/index.d.ts +2 -2
  558. package/lib/comment/index.js +52 -21
  559. package/lib/comment/index.js.map +1 -1
  560. package/lib/comment/style/index.js +2 -3
  561. package/lib/config-provider/DisabledContext.js +48 -32
  562. package/lib/config-provider/SizeContext.js +49 -29
  563. package/lib/config-provider/config-provider.d.ts +1 -1
  564. package/lib/config-provider/config-provider.js +16 -8
  565. package/lib/config-provider/config-provider.js.map +1 -1
  566. package/lib/config-provider/index.d.ts +28 -3
  567. package/lib/config-provider/index.d.ts.map +1 -1
  568. package/lib/config-provider/index.js +116 -24
  569. package/lib/config-provider/index.js.map +1 -1
  570. package/lib/config-provider/style/index.js +2 -3
  571. package/lib/connect/index.js +41 -29
  572. package/lib/date-picker/DatePicker.d.ts +21 -0
  573. package/lib/date-picker/DatePicker.d.ts.map +1 -0
  574. package/lib/date-picker/DatePicker.js +163 -0
  575. package/lib/date-picker/DatePicker.js.map +1 -0
  576. package/lib/date-picker/index.d.ts +3 -3
  577. package/lib/date-picker/index.js +76 -31
  578. package/lib/date-picker/index.js.map +1 -1
  579. package/lib/date-picker/index.less +294 -0
  580. package/lib/date-picker/style/index.js +2 -5
  581. package/lib/descriptions/descriptions.d.ts +4 -4
  582. package/lib/descriptions/descriptions.js +191 -102
  583. package/lib/descriptions/descriptions.js.map +1 -1
  584. package/lib/descriptions/index.js +22 -22
  585. package/lib/descriptions/index.js.map +1 -1
  586. package/lib/descriptions/style/index.js +2 -3
  587. package/lib/development-login/LoginModal.js +206 -80
  588. package/lib/development-login/index.js +116 -35
  589. package/lib/divider/index.d.ts +2 -2
  590. package/lib/divider/index.js +52 -21
  591. package/lib/divider/index.js.map +1 -1
  592. package/lib/divider/style/index.js +2 -3
  593. package/lib/drawer/drawer.d.ts +2 -2
  594. package/lib/drawer/drawer.js +195 -100
  595. package/lib/drawer/drawer.js.map +1 -1
  596. package/lib/drawer/index.d.ts +1 -1
  597. package/lib/drawer/index.js +20 -19
  598. package/lib/drawer/index.js.map +1 -1
  599. package/lib/drawer/style/index.js +2 -4
  600. package/lib/dropdown/index.d.ts +2 -2
  601. package/lib/dropdown/index.js +52 -21
  602. package/lib/dropdown/index.js.map +1 -1
  603. package/lib/dropdown/style/index.js +2 -4
  604. package/lib/ellipsis/Svg/CopySVG.js +74 -21
  605. package/lib/ellipsis/Svg/TickSVG.js +52 -16
  606. package/lib/ellipsis/index.js +268 -147
  607. package/lib/empty/empty.d.ts +2 -2
  608. package/lib/empty/empty.js +140 -75
  609. package/lib/empty/empty.js.map +1 -1
  610. package/lib/empty/empty.stories.js +28 -19
  611. package/lib/empty/index.js +19 -19
  612. package/lib/empty/style/index.js +2 -3
  613. package/lib/exception/exception.js +49 -31
  614. package/lib/exception/exception.js.map +1 -1
  615. package/lib/exception/index.js +18 -18
  616. package/lib/form/form.d.ts +4 -4
  617. package/lib/form/form.js +145 -86
  618. package/lib/form/form.js.map +1 -1
  619. package/lib/form/index.js +19 -19
  620. package/lib/form/style/index.js +2 -4
  621. package/lib/grid/index.d.ts +2 -2
  622. package/lib/grid/index.js +52 -21
  623. package/lib/grid/index.js.map +1 -1
  624. package/lib/grid/style/index.js +2 -3
  625. package/lib/grid-v4/RowContext.js +8 -5
  626. package/lib/grid-v4/col.js +144 -96
  627. package/lib/grid-v4/hooks/useBreakpoint.js +30 -22
  628. package/lib/grid-v4/index.js +29 -15
  629. package/lib/grid-v4/row.js +268 -158
  630. package/lib/grid-v4/style/index.js +2 -4
  631. package/lib/handle/index.js +199 -129
  632. package/lib/handle/index.js.map +1 -1
  633. package/lib/handle-icon/index.js +258 -182
  634. package/lib/handle-icon/index.js.map +1 -1
  635. package/lib/icon/IconFont.js +91 -77
  636. package/lib/icon/components/Icon.js +224 -98
  637. package/lib/icon/components/index.js +16 -8
  638. package/lib/icon/components/utils.js +154 -94
  639. package/lib/icon/index.js +188 -117
  640. package/lib/icon/index.js.map +1 -1
  641. package/lib/icon/style/index.js +2 -3
  642. package/lib/icon/twoTonePrimaryColor.js +18 -15
  643. package/lib/icon/utils.js +67 -68
  644. package/lib/icon-list/index.js +6 -121
  645. package/lib/icon-old/index.d.ts +2 -2
  646. package/lib/icon-old/index.js +52 -21
  647. package/lib/icon-old/index.js.map +1 -1
  648. package/lib/icon-old/style/index.js +2 -3
  649. package/lib/img/Contain.js +71 -45
  650. package/lib/img/Cover.js +192 -79
  651. package/lib/img/index.js +149 -61
  652. package/lib/index.d.ts +1 -0
  653. package/lib/index.d.ts.map +1 -1
  654. package/lib/index.js +750 -224
  655. package/lib/index.js.map +1 -1
  656. package/lib/input/index.js +19 -19
  657. package/lib/input/input.d.ts +5 -5
  658. package/lib/input/input.js +162 -92
  659. package/lib/input/input.js.map +1 -1
  660. package/lib/input/style/index.js +2 -4
  661. package/lib/input-number/index.d.ts +3 -3
  662. package/lib/input-number/index.js +82 -55
  663. package/lib/input-number/index.js.map +1 -1
  664. package/lib/input-number/inputNumber.d.ts +10 -0
  665. package/lib/input-number/inputNumber.d.ts.map +1 -0
  666. package/lib/input-number/inputNumber.js +89 -0
  667. package/lib/input-number/inputNumber.js.map +1 -0
  668. package/lib/input-number/inputNumber.less +12 -0
  669. package/lib/input-number/style/index.js +2 -3
  670. package/lib/label/index.d.ts +2 -2
  671. package/lib/label/index.js +182 -138
  672. package/lib/label/index.js.map +1 -1
  673. package/lib/layout/index.d.ts +2 -2
  674. package/lib/layout/index.js +52 -21
  675. package/lib/layout/index.js.map +1 -1
  676. package/lib/layout/style/index.js +2 -3
  677. package/lib/list/index.d.ts +2 -2
  678. package/lib/list/index.js +52 -21
  679. package/lib/list/index.js.map +1 -1
  680. package/lib/list/style/index.js +2 -4
  681. package/lib/loading-button/index.js +133 -56
  682. package/lib/locale/default.js +15 -10
  683. package/lib/locale/default.js.map +1 -1
  684. package/lib/locale/en_US.js +84 -78
  685. package/lib/locale/en_US.js.map +1 -1
  686. package/lib/locale/index.js +36 -18
  687. package/lib/locale/zh_CN.js +76 -71
  688. package/lib/locale/zh_CN.js.map +1 -1
  689. package/lib/locale-provider/index.d.ts +2 -2
  690. package/lib/locale-provider/index.js +56 -25
  691. package/lib/locale-provider/index.js.map +1 -1
  692. package/lib/locale-provider/style/index.js +2 -3
  693. package/lib/mentions/index.d.ts +2 -2
  694. package/lib/mentions/index.js +52 -21
  695. package/lib/mentions/index.js.map +1 -1
  696. package/lib/mentions/style/index.js +2 -4
  697. package/lib/menu/index.d.ts +2 -2
  698. package/lib/menu/index.js +52 -21
  699. package/lib/menu/index.js.map +1 -1
  700. package/lib/menu/style/index.js +2 -5
  701. package/lib/message/index.d.ts +2 -2
  702. package/lib/message/index.js +52 -21
  703. package/lib/message/index.js.map +1 -1
  704. package/lib/message/style/index.js +2 -3
  705. package/lib/modal/index.js +21 -21
  706. package/lib/modal/index.js.map +1 -1
  707. package/lib/modal/index.less +36 -0
  708. package/lib/modal/modal.d.ts +4 -4
  709. package/lib/modal/modal.js +129 -65
  710. package/lib/modal/modal.js.map +1 -1
  711. package/lib/modal/style/index.js +2 -4
  712. package/lib/notification/assets/index.js +23 -10
  713. package/lib/notification/assets/svg-error-tip.d.ts +1 -1
  714. package/lib/notification/assets/svg-error-tip.js +181 -56
  715. package/lib/notification/assets/svg-success-tip.d.ts +1 -1
  716. package/lib/notification/assets/svg-success-tip.js +198 -60
  717. package/lib/notification/index.d.ts +1 -1
  718. package/lib/notification/index.js +25 -22
  719. package/lib/notification/index.js.map +1 -1
  720. package/lib/notification/notification.d.ts +2 -2
  721. package/lib/notification/notification.js +137 -40
  722. package/lib/notification/notification.js.map +1 -1
  723. package/lib/notification/style/index.js +2 -3
  724. package/lib/page/Box.js +67 -40
  725. package/lib/page/index.js +192 -95
  726. package/lib/page/utils.js +21 -18
  727. package/lib/page-container/index.js +24 -13
  728. package/lib/page-header/index.d.ts +2 -2
  729. package/lib/page-header/index.js +52 -21
  730. package/lib/page-header/index.js.map +1 -1
  731. package/lib/page-header/style/index.js +2 -4
  732. package/lib/page-loading/index.js +35 -27
  733. package/lib/page-loading/index.js.map +1 -1
  734. package/lib/page-loading/loading.gif +0 -0
  735. package/lib/pagination/index.d.ts +2 -2
  736. package/lib/pagination/index.js +52 -21
  737. package/lib/pagination/index.js.map +1 -1
  738. package/lib/pagination/style/index.js +2 -4
  739. package/lib/popconfirm/index.d.ts +2 -2
  740. package/lib/popconfirm/index.js +52 -21
  741. package/lib/popconfirm/index.js.map +1 -1
  742. package/lib/popconfirm/index.less +32 -0
  743. package/lib/popconfirm/popconfirm.d.ts +8 -0
  744. package/lib/popconfirm/popconfirm.d.ts.map +1 -0
  745. package/lib/popconfirm/popconfirm.js +96 -0
  746. package/lib/popconfirm/popconfirm.js.map +1 -0
  747. package/lib/popconfirm/style/index.js +2 -5
  748. package/lib/popover/index.d.ts +2 -2
  749. package/lib/popover/index.js +52 -21
  750. package/lib/popover/index.js.map +1 -1
  751. package/lib/popover/index.less +57 -0
  752. package/lib/popover/popover.d.ts +14 -0
  753. package/lib/popover/popover.d.ts.map +1 -0
  754. package/lib/popover/popover.js +90 -0
  755. package/lib/popover/popover.js.map +1 -0
  756. package/lib/popover/style/index.js +2 -5
  757. package/lib/prev-locale.d.ts +12 -3
  758. package/lib/prev-locale.d.ts.map +1 -1
  759. package/lib/prev-locale.js +202 -135
  760. package/lib/prev-locale.js.map +1 -1
  761. package/lib/preview-text/index.d.ts +4 -4
  762. package/lib/preview-text/index.js +296 -209
  763. package/lib/preview-text/index.js.map +1 -1
  764. package/lib/progress/index.d.ts +2 -2
  765. package/lib/progress/index.js +52 -21
  766. package/lib/progress/index.js.map +1 -1
  767. package/lib/progress/progress.d.ts +12 -0
  768. package/lib/progress/progress.d.ts.map +1 -0
  769. package/lib/progress/progress.js +179 -0
  770. package/lib/progress/progress.js.map +1 -0
  771. package/lib/progress/progress.less +82 -0
  772. package/lib/progress/style/index.js +2 -3
  773. package/lib/query-form/Field/Checkbox.js +30 -23
  774. package/lib/query-form/Field/Select.js +172 -68
  775. package/lib/query-form/Field/SelectInput.js +192 -77
  776. package/lib/query-form/Field/fieldsMap.d.ts +1 -1
  777. package/lib/query-form/Field/fieldsMap.js +55 -53
  778. package/lib/query-form/Field/index.js +239 -96
  779. package/lib/query-form/createActions.js +57 -51
  780. package/lib/query-form/index.js +474 -286
  781. package/lib/query-form/useForm.js +15 -11
  782. package/lib/query-form-backup/Field/Composition/FieldPopover.less +35 -0
  783. package/lib/query-form-backup/Field/Composition/index.less +114 -0
  784. package/lib/query-form-backup/index.less +90 -0
  785. package/lib/query-list-scene/List.js +448 -289
  786. package/lib/query-list-scene/QueryForm.js +233 -103
  787. package/lib/query-list-scene/QueryListScene.js +138 -30
  788. package/lib/query-list-scene/Title.js +18 -9
  789. package/lib/query-list-scene/Toolbar.js +60 -21
  790. package/lib/query-list-scene/createActions.js +83 -65
  791. package/lib/query-list-scene/index.js +28 -24
  792. package/lib/query-list-scene/useActions.js +15 -11
  793. package/lib/radio/index.d.ts +2 -2
  794. package/lib/radio/index.js +59 -23
  795. package/lib/radio/index.js.map +1 -1
  796. package/lib/radio/radio-group.d.ts +1 -1
  797. package/lib/radio/radio-group.js +14 -9
  798. package/lib/radio/radio-group.js.map +1 -1
  799. package/lib/radio/radio.d.ts +17 -0
  800. package/lib/radio/radio.d.ts.map +1 -0
  801. package/lib/radio/radio.js +110 -0
  802. package/lib/radio/radio.js.map +1 -0
  803. package/lib/radio/radio.less +43 -0
  804. package/lib/radio/style/index.js +2 -3
  805. package/lib/rate/index.d.ts +2 -2
  806. package/lib/rate/index.js +52 -21
  807. package/lib/rate/index.js.map +1 -1
  808. package/lib/rate/style/index.js +2 -4
  809. package/lib/render-empty/index.js +7 -4
  810. package/lib/render-empty/render-empty.js +31 -22
  811. package/lib/result/index.d.ts +2 -2
  812. package/lib/result/index.js +52 -21
  813. package/lib/result/index.js.map +1 -1
  814. package/lib/result/style/index.js +2 -3
  815. package/lib/row/index.d.ts +2 -2
  816. package/lib/row/index.js +52 -21
  817. package/lib/row/index.js.map +1 -1
  818. package/lib/row/style/index.js +2 -5
  819. package/lib/scroll-bar/Bar.js +165 -73
  820. package/lib/scroll-bar/Context.js +15 -10
  821. package/lib/scroll-bar/ScrollBar.js +124 -88
  822. package/lib/scroll-bar/Thumb.js +198 -133
  823. package/lib/scroll-bar/index.js +12 -7
  824. package/lib/scroll-bar/util.js +64 -30
  825. package/lib/segmented/index.d.ts +1 -1
  826. package/lib/segmented/index.js +121 -69
  827. package/lib/select/index.d.ts +1 -1
  828. package/lib/select/index.js +20 -19
  829. package/lib/select/index.js.map +1 -1
  830. package/lib/select/select.d.ts +2 -2
  831. package/lib/select/select.js +116 -66
  832. package/lib/select/select.js.map +1 -1
  833. package/lib/select/style/index.js +2 -4
  834. package/lib/skeleton/index.d.ts +2 -2
  835. package/lib/skeleton/index.js +52 -21
  836. package/lib/skeleton/index.js.map +1 -1
  837. package/lib/skeleton/style/index.js +2 -3
  838. package/lib/slider/index.d.ts +2 -2
  839. package/lib/slider/index.js +52 -21
  840. package/lib/slider/index.js.map +1 -1
  841. package/lib/slider/style/index.js +2 -4
  842. package/lib/spin/index.d.ts +2 -2
  843. package/lib/spin/index.js +52 -21
  844. package/lib/spin/index.js.map +1 -1
  845. package/lib/spin/spin.d.ts +9 -0
  846. package/lib/spin/spin.d.ts.map +1 -0
  847. package/lib/spin/spin.js +79 -0
  848. package/lib/spin/spin.js.map +1 -0
  849. package/lib/spin/spin.less +9 -0
  850. package/lib/spin/style/index.js +2 -3
  851. package/lib/statistic/index.d.ts +2 -2
  852. package/lib/statistic/index.js +52 -21
  853. package/lib/statistic/index.js.map +1 -1
  854. package/lib/statistic/style/index.js +2 -3
  855. package/lib/steps/assets/background_left.svg +12 -0
  856. package/lib/steps/assets/background_right.svg +12 -0
  857. package/lib/steps/assets/horizontal_line.svg +3 -0
  858. package/lib/steps/assets/vertical_line.svg +3 -0
  859. package/lib/steps/index.js +19 -19
  860. package/lib/steps/stepStyle/icon.less +51 -0
  861. package/lib/steps/stepStyle/progress-dot.less +10 -0
  862. package/lib/steps/stepStyle/variables.less +8 -0
  863. package/lib/steps/stepStyle/vertical.less +41 -0
  864. package/lib/steps/steps.d.ts +3 -3
  865. package/lib/steps/steps.js +123 -63
  866. package/lib/steps/steps.js.map +1 -1
  867. package/lib/steps/style/index.js +2 -3
  868. package/lib/style/index.js +2 -3
  869. package/lib/style/v2-compatible-reset.js +2 -3
  870. package/lib/svg-components/illustration-403.d.ts +1 -1
  871. package/lib/svg-components/illustration-403.js +247 -84
  872. package/lib/svg-components/illustration-404.d.ts +1 -1
  873. package/lib/svg-components/illustration-404.js +331 -101
  874. package/lib/svg-components/illustration-500.d.ts +1 -1
  875. package/lib/svg-components/illustration-500.js +362 -109
  876. package/lib/svg-components/illustration-empty.d.ts +1 -1
  877. package/lib/svg-components/illustration-empty.js +95 -41
  878. package/lib/svg-components/illustration-failure.d.ts +1 -1
  879. package/lib/svg-components/illustration-failure.js +153 -62
  880. package/lib/svg-components/illustration-no-access.d.ts +1 -1
  881. package/lib/svg-components/illustration-no-access.js +155 -61
  882. package/lib/svg-components/illustration-no-chart.d.ts +1 -1
  883. package/lib/svg-components/illustration-no-chart.js +175 -63
  884. package/lib/svg-components/illustration-no-result.d.ts +1 -1
  885. package/lib/svg-components/illustration-no-result.js +133 -58
  886. package/lib/svg-components/illustration-offline.d.ts +1 -1
  887. package/lib/svg-components/illustration-offline.js +208 -64
  888. package/lib/svg-components/illustration-success.d.ts +1 -1
  889. package/lib/svg-components/illustration-success.js +178 -69
  890. package/lib/svg-components/index.js +79 -26
  891. package/lib/switch/index.js +52 -21
  892. package/lib/switch/index.less +45 -0
  893. package/lib/switch/style/index.js +2 -3
  894. package/lib/switch/switch.d.ts +2 -2
  895. package/lib/switch/switch.js +67 -26
  896. package/lib/switch/switch.js.map +1 -1
  897. package/lib/table/assets/image-loading-background.d.ts +1 -1
  898. package/lib/table/assets/image-loading-background.js +86 -43
  899. package/lib/table/assets/image-loading.d.ts +1 -1
  900. package/lib/table/assets/image-loading.js +67 -31
  901. package/lib/table/constants.js +5 -3
  902. package/lib/table/context.js +6 -4
  903. package/lib/table/hooks/index.js +25 -17
  904. package/lib/table/hooks/use-column-setting.d.ts +1 -1
  905. package/lib/table/hooks/use-column-setting.js +79 -21
  906. package/lib/table/hooks/use-column-setting.js.map +1 -1
  907. package/lib/table/hooks/use-expand-fixed.js +474 -79
  908. package/lib/table/index.js +19 -19
  909. package/lib/table/resizableTable/index.js +233 -104
  910. package/lib/table/style/index.js +2 -5
  911. package/lib/table/table-hoc.d.ts +3 -3
  912. package/lib/table/table-hoc.js +31 -29
  913. package/lib/table/table-hoc.js.map +1 -1
  914. package/lib/table/table.d.ts +3 -3
  915. package/lib/table/table.js +336 -209
  916. package/lib/table/table.js.map +1 -1
  917. package/lib/table/table.stories.js +620 -377
  918. package/lib/table/total-shower.d.ts +2 -2
  919. package/lib/table/total-shower.js +18 -11
  920. package/lib/table/total-shower.js.map +1 -1
  921. package/lib/table/utils.d.ts +1 -1
  922. package/lib/table/utils.js +39 -62
  923. package/lib/table/utils.js.map +1 -1
  924. package/lib/table-container/index.js +23 -12
  925. package/lib/tabs/index.js +19 -19
  926. package/lib/tabs/style/index.js +2 -3
  927. package/lib/tabs/tabPane.js +1 -2
  928. package/lib/tabs/tabs.d.ts +3 -3
  929. package/lib/tabs/tabs.js +94 -64
  930. package/lib/tabs/tabs.js.map +1 -1
  931. package/lib/tabs/tabs.less +125 -0
  932. package/lib/tabs-container/index.js +24 -13
  933. package/lib/tag/index.js +20 -20
  934. package/lib/tag/style/index.js +2 -3
  935. package/lib/tag/tag.d.ts +4 -4
  936. package/lib/tag/tag.js +215 -151
  937. package/lib/tag/tag.js.map +1 -1
  938. package/lib/time-picker/TimePicker.d.ts +9 -0
  939. package/lib/time-picker/TimePicker.d.ts.map +1 -0
  940. package/lib/time-picker/TimePicker.js +90 -0
  941. package/lib/time-picker/TimePicker.js.map +1 -0
  942. package/lib/time-picker/index.d.ts +2 -2
  943. package/lib/time-picker/index.js +54 -23
  944. package/lib/time-picker/index.js.map +1 -1
  945. package/lib/time-picker/index.less +38 -0
  946. package/lib/time-picker/style/index.js +2 -3
  947. package/lib/timeline/index.d.ts +2 -2
  948. package/lib/timeline/index.js +52 -21
  949. package/lib/timeline/index.js.map +1 -1
  950. package/lib/timeline/style/index.js +2 -3
  951. package/lib/title/index.js +64 -31
  952. package/lib/tntd-action/Action.d.ts +6 -0
  953. package/lib/tntd-action/Action.d.ts.map +1 -0
  954. package/lib/tntd-action/Action.js +218 -0
  955. package/lib/tntd-action/Action.js.map +1 -0
  956. package/lib/tntd-action/index.js +9 -6
  957. package/lib/tntd-action/index.less +70 -0
  958. package/lib/tntd-action_backup/index.less +114 -0
  959. package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +48 -32
  960. package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +39 -26
  961. package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +39 -26
  962. package/lib/tntd-cascader/AntdCascader/component/context.js +19 -16
  963. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +64 -39
  964. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js.map +1 -1
  965. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +112 -78
  966. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +83 -51
  967. package/lib/tntd-cascader/AntdCascader/config/utils.js +58 -29
  968. package/lib/tntd-cascader/AntdCascader/config/warning.js +49 -35
  969. package/lib/tntd-cascader/AntdCascader/index.js +284 -162
  970. package/lib/tntd-cascader/AntdCascader/interface.js +13 -7
  971. package/lib/tntd-cascader/img/no-data-s.png +0 -0
  972. package/lib/tntd-cascader/index.js +16 -8
  973. package/lib/tntd-cascader/rc-cascader/Cascader.js +413 -288
  974. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +82 -40
  975. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +285 -167
  976. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +327 -164
  977. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +116 -49
  978. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +263 -167
  979. package/lib/tntd-cascader/rc-cascader/context.js +42 -27
  980. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +111 -64
  981. package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +70 -50
  982. package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +57 -42
  983. package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +47 -33
  984. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +65 -51
  985. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +141 -66
  986. package/lib/tntd-cascader/rc-cascader/index.js +12 -7
  987. package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +46 -38
  988. package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +42 -39
  989. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +37 -30
  990. package/lib/tntd-checkbox-select/index.js +332 -169
  991. package/lib/tntd-form/ErrorList.js +171 -77
  992. package/lib/tntd-form/Form.js +262 -139
  993. package/lib/tntd-form/FormItem/ItemHolder.js +242 -152
  994. package/lib/tntd-form/FormItem/index.js +371 -251
  995. package/lib/tntd-form/FormItemInput.js +122 -62
  996. package/lib/tntd-form/FormItemLabel.js +151 -96
  997. package/lib/tntd-form/FormList.js +84 -58
  998. package/lib/tntd-form/context.js +79 -61
  999. package/lib/tntd-form/hooks/useDebounce.js +101 -37
  1000. package/lib/tntd-form/hooks/useForm.js +133 -57
  1001. package/lib/tntd-form/hooks/useFormInstance.js +11 -8
  1002. package/lib/tntd-form/hooks/useFormItemStatus.js +21 -13
  1003. package/lib/tntd-form/hooks/useFrameState.js +129 -63
  1004. package/lib/tntd-form/hooks/useItemRef.js +55 -41
  1005. package/lib/tntd-form/index.js +58 -42
  1006. package/lib/tntd-form/interface.js +6 -4
  1007. package/lib/tntd-form/style/index.js +2 -4
  1008. package/lib/tntd-form/util.js +18 -19
  1009. package/lib/tntd-form/validateMessagesContext.js +7 -4
  1010. package/lib/tntd-icon/fonts/iconfont.js +36 -53
  1011. package/lib/tntd-icon/index.js +41 -25
  1012. package/lib/tntd-layout/ActionsContext.js +7 -4
  1013. package/lib/tntd-layout/AppList.js +253 -222
  1014. package/lib/tntd-layout/Application.js +155 -109
  1015. package/lib/tntd-layout/Avatar.js +139 -134
  1016. package/lib/tntd-layout/CompatibleLanguage.js +207 -177
  1017. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +156 -145
  1018. package/lib/tntd-layout/EnterpriseLayout/Language.js +153 -88
  1019. package/lib/tntd-layout/EnterpriseLayout/Theme.js +149 -100
  1020. package/lib/tntd-layout/EnterpriseLayout/index.js +31 -17
  1021. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +361 -272
  1022. package/lib/tntd-layout/GlobalNavigation/index.js +195 -112
  1023. package/lib/tntd-layout/Header.js +115 -130
  1024. package/lib/tntd-layout/HeaderActions.js +145 -107
  1025. package/lib/tntd-layout/HeaderNavs.js +155 -105
  1026. package/lib/tntd-layout/HeaderTabs.js +318 -312
  1027. package/lib/tntd-layout/Iconfont.js +15 -8
  1028. package/lib/tntd-layout/Language.js +150 -75
  1029. package/lib/tntd-layout/Layout.js +292 -167
  1030. package/lib/tntd-layout/Logo.js +108 -139
  1031. package/lib/tntd-layout/OrgAppList.js +315 -383
  1032. package/lib/tntd-layout/SideMenu.js +347 -406
  1033. package/lib/tntd-layout/Theme.js +154 -90
  1034. package/lib/tntd-layout/createActions.js +49 -35
  1035. package/lib/tntd-layout/images/avatar/empty.png +0 -0
  1036. package/lib/tntd-layout/images/avatar/female1.png +0 -0
  1037. package/lib/tntd-layout/images/avatar/female2.png +0 -0
  1038. package/lib/tntd-layout/images/avatar/female3.png +0 -0
  1039. package/lib/tntd-layout/images/avatar/female4.png +0 -0
  1040. package/lib/tntd-layout/images/avatar/female5.png +0 -0
  1041. package/lib/tntd-layout/images/avatar/female6.png +0 -0
  1042. package/lib/tntd-layout/images/avatar/male1.png +0 -0
  1043. package/lib/tntd-layout/images/avatar/male2.png +0 -0
  1044. package/lib/tntd-layout/images/avatar/male3.png +0 -0
  1045. package/lib/tntd-layout/images/avatar/male4.png +0 -0
  1046. package/lib/tntd-layout/images/avatar/male5.png +0 -0
  1047. package/lib/tntd-layout/images/avatar/male6.png +0 -0
  1048. package/lib/tntd-layout/images/index.js +70 -67
  1049. package/lib/tntd-layout/index.js +168 -96
  1050. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +210 -179
  1051. package/lib/tntd-layout/paaslayout/Header.js +90 -74
  1052. package/lib/tntd-layout/paaslayout/Logo.js +25 -27
  1053. package/lib/tntd-layout/paaslayout/SideMenu.js +212 -146
  1054. package/lib/tntd-layout/paaslayout/index.js +285 -139
  1055. package/lib/tntd-layout/storage.js +65 -46
  1056. package/lib/tntd-modal/index.js +190 -62
  1057. package/lib/tntd-rc-select/_util/DisabledContext.js +48 -32
  1058. package/lib/tntd-rc-select/_util/FormItemInputContext.js +39 -26
  1059. package/lib/tntd-rc-select/_util/PurePanel.js +161 -78
  1060. package/lib/tntd-rc-select/_util/SizeContext.js +39 -26
  1061. package/lib/tntd-rc-select/_util/context.js +19 -16
  1062. package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +69 -39
  1063. package/lib/tntd-rc-select/_util/defaultRenderEmpty.js.map +1 -1
  1064. package/lib/tntd-rc-select/_util/getIcons.js +115 -78
  1065. package/lib/tntd-rc-select/_util/interface.js +13 -7
  1066. package/lib/tntd-rc-select/_util/motion.js +50 -36
  1067. package/lib/tntd-rc-select/_util/type.js +16 -6
  1068. package/lib/tntd-rc-select/_util/useCompactItemContext.js +83 -51
  1069. package/lib/tntd-rc-select/_util/warning.js +49 -35
  1070. package/lib/tntd-rc-select/img/no-data-s.png +0 -0
  1071. package/lib/tntd-rc-select/index.js +206 -125
  1072. package/lib/tntd-reference/AHref/index.js +46 -38
  1073. package/lib/tntd-reference/ReferenceBatchCheck/index.js +166 -99
  1074. package/lib/tntd-reference/ReferenceBatchDrawer/index.js +198 -83
  1075. package/lib/tntd-reference/ReferenceCheck/index.js +127 -74
  1076. package/lib/tntd-reference/ReferenceDrawer/index.js +165 -68
  1077. package/lib/tntd-reference/ReferenceInfo/index.js +162 -93
  1078. package/lib/tntd-reference/index.js +23 -18
  1079. package/lib/tntd-second-page/index.js +63 -32
  1080. package/lib/tntd-second-page/index.js.map +1 -1
  1081. package/lib/tntd-select/DropDownWrap.js +188 -78
  1082. package/lib/tntd-select/index.d.ts +1 -1
  1083. package/lib/tntd-select/index.js +745 -549
  1084. package/lib/tntd-select/index.less +7 -0
  1085. package/lib/tntd-virtual-tree/index.js +395 -230
  1086. package/lib/tntd-virtual-tree/utils.js +328 -197
  1087. package/lib/tntd-virtual-tree-select/index.js +281 -151
  1088. package/lib/tntd-virtual-tree-select/utils.js +86 -46
  1089. package/lib/tooltip/index.js +53 -22
  1090. package/lib/tooltip/style/index.js +2 -3
  1091. package/lib/tooltip/tooltip.d.ts +2 -2
  1092. package/lib/tooltip/tooltip.js +96 -62
  1093. package/lib/tooltip/tooltip.js.map +1 -1
  1094. package/lib/transfer/index.d.ts +2 -2
  1095. package/lib/transfer/index.js +52 -21
  1096. package/lib/transfer/index.js.map +1 -1
  1097. package/lib/transfer/style/index.js +2 -4
  1098. package/lib/tree/index.d.ts +2 -2
  1099. package/lib/tree/index.js +52 -21
  1100. package/lib/tree/index.js.map +1 -1
  1101. package/lib/tree/style/index.js +2 -3
  1102. package/lib/tree-select/index.d.ts +4 -4
  1103. package/lib/tree-select/index.js +58 -26
  1104. package/lib/tree-select/index.js.map +1 -1
  1105. package/lib/tree-select/style/index.js +2 -5
  1106. package/lib/typography/index.d.ts +2 -2
  1107. package/lib/typography/index.js +52 -21
  1108. package/lib/typography/index.js.map +1 -1
  1109. package/lib/typography/style/index.js +2 -4
  1110. package/lib/upload/index.d.ts +1 -1
  1111. package/lib/upload/index.js +340 -143
  1112. package/lib/upload/index.js.map +1 -1
  1113. package/lib/upload/style/index.js +2 -4
  1114. package/lib/upload/svg/UploadSVG.js +47 -18
  1115. package/lib/utils/checkAuth.js +37 -24
  1116. package/lib/utils/findMenuInfoByPath.js +40 -35
  1117. package/lib/utils/index.js +165 -94
  1118. package/lib/utils/lang.js +81 -126
  1119. package/lib/utils/simple-template.js +11 -7
  1120. package/lib/version/index.d.ts +2 -2
  1121. package/lib/version/index.js +52 -21
  1122. package/lib/version/index.js.map +1 -1
  1123. package/lib/version/style/index.js +2 -4
  1124. package/lib/water-mark/index.js +206 -118
  1125. package/package.json +1 -1
@@ -1,7 +1,13 @@
1
- import { useRef } from 'react';
2
- import createActions from './createActions';
3
- export default function useActions() {
4
- const actions = useRef(createActions());
5
- return actions.current;
6
- }
7
- //# sourceMappingURL=useActions.js.map
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = useActions;
7
+ var _react = require("react");
8
+ var _createActions = _interopRequireDefault(require("./createActions"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function useActions() {
11
+ var actions = (0, _react.useRef)((0, _createActions["default"])());
12
+ return actions.current;
13
+ }
package/es/radio/index.js CHANGED
@@ -1,8 +1,28 @@
1
- import Radio from 'antd/es/radio';
2
- import RadioGroup from './radio-group';
3
- import './style';
4
- export * from 'antd/es/radio';
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ var _exportNames = {};
8
+ exports["default"] = void 0;
9
+ var _radio = _interopRequireWildcard(require("antd/es/radio"));
10
+ Object.keys(_radio).forEach(function (key) {
11
+ if (key === "default" || key === "__esModule") return;
12
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
13
+ if (key in exports && exports[key] === _radio[key]) return;
14
+ Object.defineProperty(exports, key, {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _radio[key];
18
+ }
19
+ });
20
+ });
21
+ var _radioGroup = _interopRequireDefault(require("./radio-group"));
22
+ require("./style");
23
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
24
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
25
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
5
26
  // @ts-ignore
6
- Radio.Group = RadioGroup;
7
- export default Radio;
8
- //# sourceMappingURL=index.js.map
27
+ _radio["default"].Group = _radioGroup["default"];
28
+ var _default = exports["default"] = _radio["default"];
@@ -1,6 +1,12 @@
1
- import 'react';
2
- import Radio from 'antd/es/radio';
3
- import { connectReadonlyComponent } from '../connect';
4
- import PreviewText from '../preview-text';
5
- export default connectReadonlyComponent(Radio.Group, PreviewText.Select);
6
- //# sourceMappingURL=radio-group.js.map
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ require("react");
8
+ var _radio = _interopRequireDefault(require("antd/es/radio"));
9
+ var _connect = require("../connect");
10
+ var _previewText = _interopRequireDefault(require("../preview-text"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
+ var _default = exports["default"] = (0, _connect.connectReadonlyComponent)(_radio["default"].Group, _previewText["default"].Select);
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) {
4
+ "@babel/helpers - typeof";
5
+
6
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
+ return typeof o;
8
+ } : function (o) {
9
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
+ }, _typeof(o);
11
+ }
12
+ Object.defineProperty(exports, "__esModule", {
13
+ value: true
14
+ });
15
+ var _exportNames = {};
16
+ exports["default"] = void 0;
17
+ var _configProvider = require("antd/es/config-provider");
18
+ var _radio = _interopRequireWildcard(require("antd/es/radio"));
19
+ Object.keys(_radio).forEach(function (key) {
20
+ if (key === "default" || key === "__esModule") return;
21
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
22
+ if (key in exports && exports[key] === _radio[key]) return;
23
+ Object.defineProperty(exports, key, {
24
+ enumerable: true,
25
+ get: function get() {
26
+ return _radio[key];
27
+ }
28
+ });
29
+ });
30
+ var _classnames = _interopRequireDefault(require("classnames"));
31
+ var _react = _interopRequireWildcard(require("react"));
32
+ var _connect = require("../connect");
33
+ var _previewText = require("../preview-text");
34
+ function _interopRequireDefault(e) {
35
+ return e && e.__esModule ? e : {
36
+ "default": e
37
+ };
38
+ }
39
+ function _getRequireWildcardCache(e) {
40
+ if ("function" != typeof WeakMap) return null;
41
+ var r = new WeakMap(),
42
+ t = new WeakMap();
43
+ return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
44
+ return e ? t : r;
45
+ })(e);
46
+ }
47
+ function _interopRequireWildcard(e, r) {
48
+ if (!r && e && e.__esModule) return e;
49
+ if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
50
+ "default": e
51
+ };
52
+ var t = _getRequireWildcardCache(r);
53
+ if (t && t.has(e)) return t.get(e);
54
+ var n = {
55
+ __proto__: null
56
+ },
57
+ a = Object.defineProperty && Object.getOwnPropertyDescriptor;
58
+ for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
59
+ var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
60
+ i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
61
+ }
62
+ return n["default"] = e, t && t.set(e, n), n;
63
+ }
64
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
65
+ var t = {};
66
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
67
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
68
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
69
+ }
70
+ return t;
71
+ };
72
+ /*
73
+ * @Author: 周泽飞 zefei.zhou@tongdun.net
74
+ * @Date: 2024-03-14 16:55:05
75
+ * @LastEditors: 周泽飞 zefei.zhou@tongdun.net
76
+ * @LastEditTime: 2024-03-14 17:00:03
77
+ * @FilePath: /tntd/packages/tntd/src/radio/radio.tsx
78
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
79
+ */
80
+
81
+ var tntPrefixCls = 'tnt-radio';
82
+ var Radio = (0, _react.forwardRef)(function (_a, ref) {
83
+ var className = _a.className,
84
+ children = _a.children,
85
+ desc = _a.desc,
86
+ rest = __rest(_a, ["className", "children", "desc"]);
87
+ return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
88
+ return _react["default"].createElement(_radio["default"], Object.assign({}, rest, {
89
+ ref: ref,
90
+ className: (0, _classnames["default"])(className, tntPrefixCls)
91
+ }), children ? _react["default"].createElement("span", {
92
+ className: "".concat(tntPrefixCls, "-children")
93
+ }, _react["default"].createElement("span", null, children), !!desc && _react["default"].createElement("span", {
94
+ className: "".concat(tntPrefixCls, "-desc")
95
+ }, desc)) : undefined);
96
+ });
97
+ });
98
+ var RadioGroup = (0, _react.forwardRef)(function (_a, ref) {
99
+ var className = _a.className,
100
+ rest = __rest(_a, ["className"]);
101
+ return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
102
+ return _react["default"].createElement(_radio["default"].Group, Object.assign({}, rest, {
103
+ ref: ref,
104
+ className: (0, _classnames["default"])(className, "".concat(tntPrefixCls, "-group"))
105
+ }));
106
+ });
107
+ });
108
+ Radio.Group = (0, _connect.connectReadonlyComponent)(RadioGroup, _previewText.PreviewText.Select);
109
+ Radio.Button = _radio["default"].Button;
110
+ var _default = exports["default"] = Radio;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.js","sourceRoot":"","sources":["../../src/radio/radio.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAKxD,OAAO,SAAS,MAAM,eAAe,CAAA;AAErC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,cAAc,eAAe,CAAA;AAe7B,MAAM,YAAY,GAAG,WAAW,CAAA;AAEhC,MAAM,KAAK,GAAG,UAAU,CAAwB,CAAC,EAAsC,EAAE,GAAG,EAAE,EAAE;QAA/C,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,OAAW,EAAN,IAAI,cAApC,iCAAsC,CAAF;IACnF,OAAO,CACL,oBAAC,cAAc,QACZ,GAAG,EAAE;QACJ,OAAO,CACL,oBAAC,SAAS,oBAAK,IAAI,IAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,CAAC,KAC1E,QAAQ,CAAC,CAAC,CAAC,CACV,8BAAM,SAAS,EAAE,GAAG,YAAY,WAAW;YACzC,kCAAO,QAAQ,CAAQ;YACtB,CAAC,CAAC,IAAI,IAAI,8BAAM,SAAS,EAAE,GAAG,YAAY,OAAO,IAAG,IAAI,CAAQ,CAC5D,CACR,CAAC,CAAC,CAAC,SAAS,CACH,CACb,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAmB,CAAA;AAEpB,MAAM,UAAU,GAAG,UAAU,CAAkC,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;IAClF,OAAO,CACL,oBAAC,cAAc,QACZ,GAAG,EAAE;QACJ,OAAO,CACL,oBAAC,SAAS,CAAC,KAAK,oBACV,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,GAAG,YAAY,QAAQ,CAAC,IACzD,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,KAAK,CAAC,KAAK,GAAG,wBAAwB,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;AACtE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAA;AAE/B,eAAe,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-03-14 16:55:05\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-03-14 17:00:03\n * @FilePath: /tntd/packages/tntd/src/radio/radio.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport type {\n RadioGroupProps as AntdRadioGroupProps,\n RadioProps as AntdRadioProps,\n} from 'antd/es/radio'\nimport AntdRadio from 'antd/es/radio'\nimport type AntdRadioGroup from 'antd/es/radio/group'\nimport classNames from 'classnames'\nimport React, { forwardRef } from 'react'\nimport { connectReadonlyComponent } from '../connect'\nimport { PreviewText } from '../preview-text'\n\nexport * from 'antd/es/radio'\n\nexport type RadioProps = AntdRadioProps & {\n desc?: string | React.ReactNode\n}\nexport type RadioGroupProps = AntdRadioGroupProps & {\n readonly?: boolean\n}\n\ninterface RadioComponent\n extends React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<AntdRadio>> {\n Group: React.FC<RadioGroupProps>\n Button: typeof AntdRadio.Button\n}\n\nconst tntPrefixCls = 'tnt-radio'\n\nconst Radio = forwardRef<AntdRadio, RadioProps>(({ className, children, desc, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdRadio {...rest} ref={ref} className={classNames(className, tntPrefixCls)}>\n {children ? (\n <span className={`${tntPrefixCls}-children`}>\n <span>{children}</span>\n {!!desc && <span className={`${tntPrefixCls}-desc`}>{desc}</span>}\n </span>\n ) : undefined}\n </AntdRadio>\n )\n }}\n </ConfigConsumer>\n )\n}) as RadioComponent\n\nconst RadioGroup = forwardRef<AntdRadioGroup, RadioGroupProps>(({ className, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdRadio.Group\n {...rest}\n ref={ref}\n className={classNames(className, `${tntPrefixCls}-group`)}\n />\n )\n }}\n </ConfigConsumer>\n )\n})\n\nRadio.Group = connectReadonlyComponent(RadioGroup, PreviewText.Select)\nRadio.Button = AntdRadio.Button\n\nexport default Radio\n"]}
@@ -0,0 +1,43 @@
1
+ @radio-prefix-cls: ~'@{ant-prefix}-radio';
2
+ @radio-inner-prefix-cls: ~'@{radio-prefix-cls}-inner';
3
+
4
+ // 选中状态
5
+ .tnt-radio,
6
+ .tnt-radio-group {
7
+ .@{radio-prefix-cls}-checked {
8
+ .@{radio-inner-prefix-cls} {
9
+ border-color: @radio-dot-color;
10
+ background-color: @radio-dot-color;
11
+ &::after {
12
+ @radio-dot-size: calc(@radio-size - 12px);
13
+
14
+ width: @radio-dot-size;
15
+ height: @radio-dot-size;
16
+ top: calc((@radio-size - @radio-dot-size) / 2 - 1px);
17
+ left: calc((@radio-size - @radio-dot-size) / 2 - 1px);
18
+ background-color: @radio-button-bg;
19
+ }
20
+ }
21
+
22
+ &.@{radio-prefix-cls}-disabled {
23
+ .@{radio-inner-prefix-cls} {
24
+ border-color: @checkbox-check-disabled-color !important;
25
+ background-color: @checkbox-check-disabled-color;
26
+ }
27
+ }
28
+ }
29
+ }
30
+
31
+ .tnt-radio {
32
+ & > span:nth-of-type(2) {
33
+ display: inline-block;
34
+ }
35
+ &-children {
36
+ display: flex;
37
+ flex-direction: column;
38
+ }
39
+ &-desc {
40
+ font-size: @font-size-sm;
41
+ color: @bg-color-spotilight-tint-50;
42
+ }
43
+ }
@@ -1,3 +1,4 @@
1
- import '../../style/index.less';
2
- import './index.less';
3
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+
3
+ require("../../style/index.less");
4
+ require("./index.less");
package/es/rate/index.js CHANGED
@@ -1,5 +1,24 @@
1
- import Rate from 'antd/es/rate';
2
- import './style';
3
- export * from 'antd/es/rate';
4
- export default Rate;
5
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ var _exportNames = {};
8
+ exports["default"] = void 0;
9
+ var _rate = _interopRequireWildcard(require("antd/es/rate"));
10
+ Object.keys(_rate).forEach(function (key) {
11
+ if (key === "default" || key === "__esModule") return;
12
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
13
+ if (key in exports && exports[key] === _rate[key]) return;
14
+ Object.defineProperty(exports, key, {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _rate[key];
18
+ }
19
+ });
20
+ });
21
+ require("./style");
22
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
24
+ var _default = exports["default"] = _rate["default"];
@@ -1,5 +1,5 @@
1
- import '../../style/index.less';
2
- import './index.less';
3
- // style dependencies
4
- import '../../tooltip/style';
5
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+
3
+ require("../../style/index.less");
4
+ require("./index.less");
5
+ require("../../tooltip/style");
@@ -1,3 +1,8 @@
1
- import { renderEmpty } from './render-empty';
2
- export default renderEmpty;
3
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _renderEmpty = require("./render-empty");
8
+ var _default = exports["default"] = _renderEmpty.renderEmpty;
@@ -1,19 +1,31 @@
1
- import React from 'react';
2
- import { ConfigConsumer } from '../config-provider';
3
- import { Empty } from '../empty';
4
- export const renderEmpty = (componentName) => (React.createElement(ConfigConsumer, null, () => {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderEmpty = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _configProvider = require("../config-provider");
9
+ var _empty = require("../empty");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ var renderEmpty = exports.renderEmpty = function renderEmpty(componentName) {
12
+ return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
5
13
  switch (componentName) {
6
- case 'Table':
7
- case 'List':
8
- return React.createElement(Empty, { type: "no-result" });
9
- case 'Select':
10
- case 'TreeSelect':
11
- case 'Cascader':
12
- case 'Transfer':
13
- case 'Mentions':
14
- return React.createElement(Empty, { size: "mini" });
15
- default:
16
- return React.createElement(Empty, null);
14
+ case 'Table':
15
+ case 'List':
16
+ return _react["default"].createElement(_empty.Empty, {
17
+ type: "no-result"
18
+ });
19
+ case 'Select':
20
+ case 'TreeSelect':
21
+ case 'Cascader':
22
+ case 'Transfer':
23
+ case 'Mentions':
24
+ return _react["default"].createElement(_empty.Empty, {
25
+ size: "mini"
26
+ });
27
+ default:
28
+ return _react["default"].createElement(_empty.Empty, null);
17
29
  }
18
- }));
19
- //# sourceMappingURL=render-empty.js.map
30
+ });
31
+ };
@@ -1,5 +1,24 @@
1
- import Result from 'antd/es/result';
2
- import './style';
3
- export * from 'antd/es/result';
4
- export default Result;
5
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ var _exportNames = {};
8
+ exports["default"] = void 0;
9
+ var _result = _interopRequireWildcard(require("antd/es/result"));
10
+ Object.keys(_result).forEach(function (key) {
11
+ if (key === "default" || key === "__esModule") return;
12
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
13
+ if (key in exports && exports[key] === _result[key]) return;
14
+ Object.defineProperty(exports, key, {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _result[key];
18
+ }
19
+ });
20
+ });
21
+ require("./style");
22
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
24
+ var _default = exports["default"] = _result["default"];
@@ -1,3 +1,4 @@
1
- import '../../style/index.less';
2
- import './index.less';
3
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+
3
+ require("../../style/index.less");
4
+ require("./index.less");
package/es/row/index.js CHANGED
@@ -1,5 +1,24 @@
1
- import Row from 'antd/es/row';
2
- import './style';
3
- export * from 'antd/es/row';
4
- export default Row;
5
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ var _exportNames = {};
8
+ exports["default"] = void 0;
9
+ var _row = _interopRequireWildcard(require("antd/es/row"));
10
+ Object.keys(_row).forEach(function (key) {
11
+ if (key === "default" || key === "__esModule") return;
12
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
13
+ if (key in exports && exports[key] === _row[key]) return;
14
+ Object.defineProperty(exports, key, {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _row[key];
18
+ }
19
+ });
20
+ });
21
+ require("./style");
22
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
24
+ var _default = exports["default"] = _row["default"];
@@ -1,5 +1,4 @@
1
- import '../../style/index.less';
2
- // style dependencies
3
- // deps-lint-skip: grid
4
- import '../../grid/style';
5
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+
3
+ require("../../style/index.less");
4
+ require("../../grid/style");
@@ -1,48 +1,91 @@
1
- import React, { forwardRef, useContext, useImperativeHandle, useState } from 'react';
2
- import Context from './Context';
3
- import Thumb from './Thumb';
4
- import { GAP } from './util';
5
- export default forwardRef((props, ref) => {
6
- const { wrapElement } = useContext(Context);
7
- const [moveX, setMoveX] = useState(0);
8
- const [moveY, setMoveY] = useState(0);
9
- const [sizeWidth, setSizeWidth] = useState(0);
10
- const [sizeHeight, setSizeHeight] = useState(0);
11
- const [ratioX, setRatioX] = useState(1);
12
- const [ratioY, setRatioY] = useState(1);
13
- useImperativeHandle(ref, () => ({
14
- update,
15
- handleScroll,
16
- }));
17
- function handleScroll() {
18
- const wrap = wrapElement.current;
19
- if (!wrap)
20
- return;
21
- const offsetHeight = wrap.offsetHeight - GAP;
22
- const offsetWidth = wrap.offsetWidth - GAP;
23
- setMoveY(((wrap.scrollTop * 100) / offsetHeight) * ratioY);
24
- setMoveX(((wrap.scrollLeft * 100) / offsetWidth) * ratioX);
25
- }
26
- function update() {
27
- const wrap = wrapElement.current;
28
- if (!wrap)
29
- return;
30
- // 滚动窗口的高度
31
- const offsetHeight = wrap.offsetHeight - GAP;
32
- const offsetWidth = wrap.offsetWidth - GAP;
33
- // 滚动条的逻辑高度
34
- const originalHeight = offsetHeight ** 2 / wrap.scrollHeight;
35
- const originalWidth = offsetWidth ** 2 / wrap.scrollWidth;
36
- // 滚动条的实际高度,因为如果内容太长会导致滚动条非常短,可能难以点击拖拽,所以设置了最小高度
37
- const height = Math.max(originalHeight, props.minSize);
38
- const width = Math.max(originalWidth, props.minSize);
39
- setRatioY(originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height)));
40
- setRatioX(originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width)));
41
- setSizeHeight(height + GAP < offsetHeight ? height : 0);
42
- setSizeWidth(width + GAP < offsetWidth ? width : 0);
43
- }
44
- return (React.createElement(React.Fragment, null,
45
- React.createElement(Thumb, { always: props.always, move: moveX, size: sizeWidth, ratio: ratioX }),
46
- React.createElement(Thumb, { always: props.always, move: moveY, size: sizeHeight, ratio: ratioY, vertical: true })));
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
47
6
  });
48
- //# sourceMappingURL=Bar.js.map
7
+ exports["default"] = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _Context = _interopRequireDefault(require("./Context"));
10
+ var _Thumb = _interopRequireDefault(require("./Thumb"));
11
+ var _util = require("./util");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
15
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
16
+ 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."); }
17
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
18
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
19
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
20
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
21
+ var _default = exports["default"] = (0, _react.forwardRef)(function (props, ref) {
22
+ var _useContext = (0, _react.useContext)(_Context["default"]),
23
+ wrapElement = _useContext.wrapElement;
24
+ var _useState = (0, _react.useState)(0),
25
+ _useState2 = _slicedToArray(_useState, 2),
26
+ moveX = _useState2[0],
27
+ setMoveX = _useState2[1];
28
+ var _useState3 = (0, _react.useState)(0),
29
+ _useState4 = _slicedToArray(_useState3, 2),
30
+ moveY = _useState4[0],
31
+ setMoveY = _useState4[1];
32
+ var _useState5 = (0, _react.useState)(0),
33
+ _useState6 = _slicedToArray(_useState5, 2),
34
+ sizeWidth = _useState6[0],
35
+ setSizeWidth = _useState6[1];
36
+ var _useState7 = (0, _react.useState)(0),
37
+ _useState8 = _slicedToArray(_useState7, 2),
38
+ sizeHeight = _useState8[0],
39
+ setSizeHeight = _useState8[1];
40
+ var _useState9 = (0, _react.useState)(1),
41
+ _useState10 = _slicedToArray(_useState9, 2),
42
+ ratioX = _useState10[0],
43
+ setRatioX = _useState10[1];
44
+ var _useState11 = (0, _react.useState)(1),
45
+ _useState12 = _slicedToArray(_useState11, 2),
46
+ ratioY = _useState12[0],
47
+ setRatioY = _useState12[1];
48
+ (0, _react.useImperativeHandle)(ref, function () {
49
+ return {
50
+ update: update,
51
+ handleScroll: handleScroll
52
+ };
53
+ });
54
+ function handleScroll() {
55
+ var wrap = wrapElement.current;
56
+ if (!wrap) return;
57
+ var offsetHeight = wrap.offsetHeight - _util.GAP;
58
+ var offsetWidth = wrap.offsetWidth - _util.GAP;
59
+ setMoveY(wrap.scrollTop * 100 / offsetHeight * ratioY);
60
+ setMoveX(wrap.scrollLeft * 100 / offsetWidth * ratioX);
61
+ }
62
+ function update() {
63
+ var wrap = wrapElement.current;
64
+ if (!wrap) return;
65
+ // 滚动窗口的高度
66
+ var offsetHeight = wrap.offsetHeight - _util.GAP;
67
+ var offsetWidth = wrap.offsetWidth - _util.GAP;
68
+ // 滚动条的逻辑高度
69
+ var originalHeight = Math.pow(offsetHeight, 2) / wrap.scrollHeight;
70
+ var originalWidth = Math.pow(offsetWidth, 2) / wrap.scrollWidth;
71
+ // 滚动条的实际高度,因为如果内容太长会导致滚动条非常短,可能难以点击拖拽,所以设置了最小高度
72
+ var height = Math.max(originalHeight, props.minSize);
73
+ var width = Math.max(originalWidth, props.minSize);
74
+ setRatioY(originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height)));
75
+ setRatioX(originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width)));
76
+ setSizeHeight(height + _util.GAP < offsetHeight ? height : 0);
77
+ setSizeWidth(width + _util.GAP < offsetWidth ? width : 0);
78
+ }
79
+ return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_Thumb["default"], {
80
+ always: props.always,
81
+ move: moveX,
82
+ size: sizeWidth,
83
+ ratio: ratioX
84
+ }), _react["default"].createElement(_Thumb["default"], {
85
+ always: props.always,
86
+ move: moveY,
87
+ size: sizeHeight,
88
+ ratio: ratioY,
89
+ vertical: true
90
+ }));
91
+ });
@@ -1,7 +1,13 @@
1
- import React from 'react';
2
- const Context = React.createContext({
3
- scrollbarElement: null,
4
- wrapElement: null,
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
5
  });
6
- export default Context;
7
- //# sourceMappingURL=Context.js.map
6
+ exports["default"] = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ var Context = _react["default"].createContext({
10
+ scrollbarElement: null,
11
+ wrapElement: null
12
+ });
13
+ var _default = exports["default"] = Context;