@para-ui/core 3.0.55 → 3.0.56

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 (407) hide show
  1. package/AutoBox/index.d.ts +34 -0
  2. package/AutoBox/index.js +277 -0
  3. package/AutoBox/protal.d.ts +17 -0
  4. package/AutoTips/autoTipsMultiline/index.d.ts +18 -0
  5. package/AutoTips/index.d.ts +35 -0
  6. package/AutoTips/index.js +271 -0
  7. package/Breadcrumbs/index.d.ts +53 -0
  8. package/Breadcrumbs/index.js +266 -0
  9. package/Breadcrumbs/lang/en_US.d.ts +4 -0
  10. package/Breadcrumbs/lang/index.d.ts +9 -0
  11. package/Breadcrumbs/lang/zh_CN.d.ts +4 -0
  12. package/Button/SplitButton.d.ts +64 -0
  13. package/Button/index.d.ts +79 -0
  14. package/Button/index.js +376 -0
  15. package/Button/lang/en_US.d.ts +4 -0
  16. package/Button/lang/index.d.ts +9 -0
  17. package/Button/lang/zh_CN.d.ts +4 -0
  18. package/ButtonGroup/index.d.ts +33 -0
  19. package/ButtonGroup/index.js +124 -0
  20. package/Carousel/index.d.ts +38 -0
  21. package/Carousel/index.js +78 -0
  22. package/Cascader/index.d.ts +54 -0
  23. package/Cascader/index.js +159 -0
  24. package/Cascader/lang/en_US.d.ts +4 -0
  25. package/Cascader/lang/index.d.ts +9 -0
  26. package/Cascader/lang/zh_CN.d.ts +4 -0
  27. package/Checkbox/index.d.ts +40 -0
  28. package/Checkbox/index.js +109 -0
  29. package/CheckboxGroup/index.d.ts +45 -0
  30. package/CheckboxGroup/index.js +142 -0
  31. package/Collapse/collapsePanel.d.ts +30 -0
  32. package/Collapse/index.d.ts +57 -0
  33. package/Collapse/index.js +152 -0
  34. package/Collapse/motion.d.ts +5 -0
  35. package/Collapse/util.d.ts +11 -0
  36. package/CollapseBox/index.d.ts +27 -0
  37. package/CollapseBox/index.js +148 -0
  38. package/CollapseBox/util.d.ts +5 -0
  39. package/CollapseLayout/index.d.ts +53 -0
  40. package/CollapseLayout/index.js +176 -0
  41. package/ColorPicker/index.d.ts +4 -0
  42. package/ColorPicker/index.js +4 -0
  43. package/ComboSelect/index.d.ts +6 -0
  44. package/ComboSelect/index.js +1049 -0
  45. package/ComboSelect/interface.d.ts +146 -0
  46. package/ComboSelect/lang/en_US.d.ts +9 -0
  47. package/ComboSelect/lang/index.d.ts +19 -0
  48. package/ComboSelect/lang/zh_CN.d.ts +9 -0
  49. package/ComboSelect/utils.d.ts +9 -0
  50. package/Container/index.d.ts +77 -0
  51. package/Container/index.js +232 -0
  52. package/DatePicker/PickerButton.d.ts +3 -0
  53. package/DatePicker/PickerTag.d.ts +3 -0
  54. package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
  55. package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -0
  56. package/DatePicker/generatePicker/index.d.ts +95 -0
  57. package/DatePicker/index.d.ts +18 -0
  58. package/DatePicker/index.js +633 -0
  59. package/DatePicker/lang/en_US.d.ts +3 -0
  60. package/DatePicker/lang/index.d.ts +7 -0
  61. package/DatePicker/lang/zh_CN.d.ts +3 -0
  62. package/DatePicker/util.d.ts +22 -0
  63. package/Desktop/index.d.ts +57 -0
  64. package/Desktop/index.js +746 -0
  65. package/DragVerify/index.d.ts +36 -0
  66. package/DragVerify/index.js +385 -0
  67. package/DragVerify/lang/en_US.d.ts +5 -0
  68. package/DragVerify/lang/index.d.ts +11 -0
  69. package/DragVerify/lang/zh_CN.d.ts +5 -0
  70. package/Drawer/index.d.ts +11 -0
  71. package/Drawer/index.js +235 -0
  72. package/Drawer/interface.d.ts +92 -0
  73. package/Drawer/lang/en_US.d.ts +5 -0
  74. package/Drawer/lang/index.d.ts +11 -0
  75. package/Drawer/lang/zh_CN.d.ts +5 -0
  76. package/Dropdown/index.d.ts +40 -0
  77. package/Dropdown/index.js +10 -0
  78. package/DynamicMultiBox/formItem.d.ts +14 -0
  79. package/DynamicMultiBox/index.d.ts +5 -0
  80. package/DynamicMultiBox/index.js +1323 -0
  81. package/DynamicMultiBox/interface.d.ts +165 -0
  82. package/DynamicMultiBox/rowForm.d.ts +24 -0
  83. package/Empty/images/index.d.ts +3 -0
  84. package/Empty/index.d.ts +30 -0
  85. package/Empty/index.js +642 -0
  86. package/Empty/lang/en_US.d.ts +6 -0
  87. package/Empty/lang/index.d.ts +13 -0
  88. package/Empty/lang/zh_CN.d.ts +6 -0
  89. package/Form/index.d.ts +187 -0
  90. package/Form/index.js +355 -0
  91. package/FormItem/compoments/defaultCompoments/index.d.ts +19 -0
  92. package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -0
  93. package/FormItem/compoments/formFile/index.d.ts +38 -0
  94. package/FormItem/compoments/formRadioGroup/index.d.ts +8 -0
  95. package/FormItem/compoments/formSelect/index.d.ts +18 -0
  96. package/FormItem/errorTips.d.ts +12 -0
  97. package/FormItem/index.d.ts +152 -0
  98. package/FormItem/index.js +78 -0
  99. package/FormItem/itemType.d.ts +42 -0
  100. package/FormItem/validateFunction.d.ts +15 -0
  101. package/FunctionModal/dialog.d.ts +58 -0
  102. package/FunctionModal/index.d.ts +8 -0
  103. package/FunctionModal/index.js +43 -0
  104. package/FunctionModal/modalContext.d.ts +15 -0
  105. package/GlobalContext/componentsProps.d.ts +21 -0
  106. package/GlobalContext/confirmLocale.d.ts +7 -0
  107. package/GlobalContext/constant.d.ts +8 -0
  108. package/GlobalContext/index.d.ts +28 -0
  109. package/GlobalContext/index.js +41 -0
  110. package/GlobalContext/intl.d.ts +34 -0
  111. package/GlobalContext/useFormatMessage.d.ts +3 -0
  112. package/GlobalContext/usePopupContainer.d.ts +4 -0
  113. package/Help/index.d.ts +24 -0
  114. package/Help/index.js +41 -0
  115. package/HelperText/index.d.ts +27 -0
  116. package/HelperText/index.js +34 -0
  117. package/Hooks/useGlobalProps.d.ts +1 -0
  118. package/InputLang/index.d.ts +57 -0
  119. package/InputLang/index.js +355 -0
  120. package/InputNumber/index.d.ts +71 -0
  121. package/InputNumber/index.js +277 -0
  122. package/Label/index.d.ts +37 -0
  123. package/Label/index.js +85 -0
  124. package/Loading/index.d.ts +17 -0
  125. package/Loading/index.js +47 -0
  126. package/Menu/footerExpansion.d.ts +9 -0
  127. package/Menu/index.d.ts +10 -0
  128. package/Menu/index.js +1105 -0
  129. package/Menu/interface.d.ts +141 -0
  130. package/Menu/logo.d.ts +9 -0
  131. package/Menu/verticalMenuList.d.ts +14 -0
  132. package/Message/index.d.ts +99 -0
  133. package/Message/index.js +246 -0
  134. package/Modal/Confirm/index.d.ts +65 -0
  135. package/Modal/index.d.ts +99 -0
  136. package/Modal/index.js +421 -0
  137. package/Modal/lang/en_US.d.ts +5 -0
  138. package/Modal/lang/index.d.ts +11 -0
  139. package/Modal/lang/zh_CN.d.ts +5 -0
  140. package/MultiBox/index.d.ts +60 -0
  141. package/MultiBox/index.js +277 -0
  142. package/MultiBox/lang/en_US.d.ts +4 -0
  143. package/MultiBox/lang/index.d.ts +9 -0
  144. package/MultiBox/lang/zh_CN.d.ts +4 -0
  145. package/Notification/index.d.ts +74 -0
  146. package/Notification/index.js +252 -0
  147. package/OperateBtn/index.d.ts +59 -0
  148. package/OperateBtn/index.js +237 -0
  149. package/OperateBtn/lang/en_US.d.ts +4 -0
  150. package/OperateBtn/lang/index.d.ts +9 -0
  151. package/OperateBtn/lang/zh_CN.d.ts +4 -0
  152. package/PageHeader/horizontalMeun.d.ts +9 -0
  153. package/PageHeader/horizontalMeunRight.d.ts +9 -0
  154. package/PageHeader/index.d.ts +10 -0
  155. package/PageHeader/index.js +1050 -0
  156. package/PageHeader/interface.d.ts +169 -0
  157. package/Pagination/index.d.ts +46 -0
  158. package/Pagination/index.js +461 -0
  159. package/Pagination/lang/en_US.d.ts +8 -0
  160. package/Pagination/lang/index.d.ts +17 -0
  161. package/Pagination/lang/zh_CN.d.ts +8 -0
  162. package/ParauiProvider/index.d.ts +8 -0
  163. package/ParauiProvider/index.js +52 -0
  164. package/PasswordRules/index.d.ts +55 -0
  165. package/PasswordRules/index.js +144 -0
  166. package/PopConfirm/index.d.ts +61 -0
  167. package/PopConfirm/index.js +194 -0
  168. package/PopConfirm/lang/en_US.d.ts +5 -0
  169. package/PopConfirm/lang/index.d.ts +11 -0
  170. package/PopConfirm/lang/zh_CN.d.ts +5 -0
  171. package/Popover/index.d.ts +16 -0
  172. package/Popover/index.js +59 -0
  173. package/Progress/Line.d.ts +47 -0
  174. package/Progress/Steps.d.ts +17 -0
  175. package/Progress/index.d.ts +83 -0
  176. package/Progress/index.js +323 -0
  177. package/Progress/utils.d.ts +6 -0
  178. package/Querying/images/index.d.ts +3 -0
  179. package/Querying/index.d.ts +26 -0
  180. package/Querying/index.js +760 -0
  181. package/Querying/lang/en_US.d.ts +4 -0
  182. package/Querying/lang/index.d.ts +9 -0
  183. package/Querying/lang/zh_CN.d.ts +4 -0
  184. package/README.md +6 -0
  185. package/Radio/index.d.ts +38 -0
  186. package/Radio/index.js +97 -0
  187. package/RadioGroup/index.d.ts +46 -0
  188. package/RadioGroup/index.js +134 -0
  189. package/Search/index.d.ts +57 -0
  190. package/Search/index.js +208 -0
  191. package/Select/index.d.ts +93 -0
  192. package/Select/index.js +1146 -0
  193. package/Select/lang/en_US.d.ts +5 -0
  194. package/Select/lang/index.d.ts +11 -0
  195. package/Select/lang/zh_CN.d.ts +5 -0
  196. package/SelectInput/index.d.ts +12 -0
  197. package/SelectInput/index.js +55 -0
  198. package/Selector/index.d.ts +11 -0
  199. package/Selector/index.js +2175 -0
  200. package/Selector/interface.d.ts +432 -0
  201. package/Selector/lang/en_US.d.ts +11 -0
  202. package/Selector/lang/index.d.ts +23 -0
  203. package/Selector/lang/zh_CN.d.ts +11 -0
  204. package/Selector/selectorData/index.d.ts +10 -0
  205. package/Selector/selectorMain/index.d.ts +10 -0
  206. package/Selector/selectorNode/index.d.ts +10 -0
  207. package/Selector/util.d.ts +15 -0
  208. package/SelectorPicker/index.d.ts +53 -0
  209. package/SelectorPicker/index.js +444 -0
  210. package/SelectorPicker/lang/en_US.d.ts +5 -0
  211. package/SelectorPicker/lang/index.d.ts +11 -0
  212. package/SelectorPicker/lang/zh_CN.d.ts +5 -0
  213. package/SingleBox/index.d.ts +44 -0
  214. package/SingleBox/index.js +224 -0
  215. package/SingleBox/lang/en_US.d.ts +4 -0
  216. package/SingleBox/lang/index.d.ts +9 -0
  217. package/SingleBox/lang/zh_CN.d.ts +4 -0
  218. package/Slider/index.d.ts +14 -0
  219. package/Slider/index.js +119 -0
  220. package/Slider/interface.d.ts +102 -0
  221. package/Split/index.d.ts +7 -0
  222. package/Split/index.js +123 -0
  223. package/Status/index.d.ts +21 -0
  224. package/Status/index.js +37 -0
  225. package/Stepper/icons.d.ts +5 -0
  226. package/Stepper/index.d.ts +59 -0
  227. package/Stepper/index.js +97 -0
  228. package/Switch/index.d.ts +78 -0
  229. package/Switch/index.js +71 -0
  230. package/Table/index.d.ts +10 -0
  231. package/Table/index.js +3001 -0
  232. package/Table/interface.d.ts +346 -0
  233. package/Table/lang/en_US.d.ts +8 -0
  234. package/Table/lang/index.d.ts +17 -0
  235. package/Table/lang/zh_CN.d.ts +8 -0
  236. package/Table/tableBody.d.ts +9 -0
  237. package/Table/tableBodyElement/index.d.ts +15 -0
  238. package/Table/tableBodyInterface.d.ts +73 -0
  239. package/Table/tableContainer/index.d.ts +16 -0
  240. package/Table/tableElement/index.d.ts +17 -0
  241. package/Table/tableHead.d.ts +9 -0
  242. package/Table/tableHeadElement/index.d.ts +15 -0
  243. package/Table/tableHeadInterface.d.ts +37 -0
  244. package/Table/tablePagination.d.ts +9 -0
  245. package/Table/tablePaginationInterface.d.ts +27 -0
  246. package/Table/tdElement/index.d.ts +15 -0
  247. package/Table/thElement/index.d.ts +28 -0
  248. package/Table/trElement/index.d.ts +15 -0
  249. package/Table/util.d.ts +34 -0
  250. package/Tabs/index.d.ts +69 -0
  251. package/Tabs/index.js +205 -0
  252. package/Tabs/lang/en_US.d.ts +4 -0
  253. package/Tabs/lang/index.d.ts +9 -0
  254. package/Tabs/lang/zh_CN.d.ts +4 -0
  255. package/Tag/TagGroup.d.ts +66 -0
  256. package/Tag/index.d.ts +34 -0
  257. package/Tag/index.js +259 -0
  258. package/TextEditor/common.d.ts +11 -0
  259. package/TextEditor/index.d.ts +127 -0
  260. package/TextEditor/index.js +286 -0
  261. package/TextField/index.d.ts +90 -0
  262. package/TextField/index.js +611 -0
  263. package/TimePicker/index.d.ts +22 -0
  264. package/TimePicker/index.js +80 -0
  265. package/TimePicker/locale/en_US.d.ts +3 -0
  266. package/TimePicker/locale/zh_CN.d.ts +3 -0
  267. package/TimePicker/style/index.d.ts +1 -0
  268. package/Timeline/TimelineItem.d.ts +30 -0
  269. package/Timeline/index.d.ts +32 -0
  270. package/Timeline/index.js +148 -0
  271. package/Title/index.d.ts +30 -0
  272. package/Title/index.js +50 -0
  273. package/ToggleButton/ToggleButtonGroup.d.ts +49 -0
  274. package/ToggleButton/index.d.ts +49 -0
  275. package/ToggleButton/index.js +193 -0
  276. package/Tooltip/index.d.ts +11 -0
  277. package/Tooltip/index.js +368 -0
  278. package/Tooltip/interface.d.ts +35 -0
  279. package/Tooltip/utils.d.ts +18 -0
  280. package/Transfer/box.d.ts +38 -0
  281. package/Transfer/index.d.ts +32 -0
  282. package/Transfer/index.js +611 -0
  283. package/Transfer/lang/en_US.d.ts +10 -0
  284. package/Transfer/lang/index.d.ts +21 -0
  285. package/Transfer/lang/zh_CN.d.ts +10 -0
  286. package/Transfer/useClick.d.ts +3 -0
  287. package/Tree/OperateBar/index.d.ts +13 -0
  288. package/Tree/Tree.d.ts +4 -0
  289. package/Tree/index.d.ts +5 -0
  290. package/Tree/index.js +38 -0
  291. package/Tree/interface.d.ts +210 -0
  292. package/Tree/lang/en_US.d.ts +8 -0
  293. package/Tree/lang/index.d.ts +17 -0
  294. package/Tree/lang/zh_CN.d.ts +8 -0
  295. package/Tree/utils/closestPolyfill.d.ts +0 -0
  296. package/Tree/utils/tools.d.ts +25 -0
  297. package/Tree/utils/treeUtil.d.ts +15 -0
  298. package/Upload/Dragger/index.d.ts +10 -0
  299. package/Upload/ErroTip/index.d.ts +13 -0
  300. package/Upload/ImageUpload/index.d.ts +16 -0
  301. package/Upload/ImgCrop/EasyCrop.d.ts +17 -0
  302. package/Upload/ImgCrop/constants.d.ts +7 -0
  303. package/Upload/ImgCrop/index.d.ts +6 -0
  304. package/Upload/ImgCrop/interface.d.ts +48 -0
  305. package/Upload/UploadList/index.d.ts +5 -0
  306. package/Upload/index.d.ts +15 -0
  307. package/Upload/index.js +1446 -0
  308. package/Upload/interface.d.ts +136 -0
  309. package/Upload/lang/en_US.d.ts +12 -0
  310. package/Upload/lang/index.d.ts +25 -0
  311. package/Upload/lang/zh_CN.d.ts +12 -0
  312. package/_verture/constant-66aa48a1.js +10 -0
  313. package/_verture/defineProperty-62acccfc.js +34 -0
  314. package/_verture/index-74f820ba.js +1355 -0
  315. package/_verture/index-77f9e0fb.js +236 -0
  316. package/_verture/index-a369ca3f.js +4 -0
  317. package/_verture/index-beef914f.js +340 -0
  318. package/_verture/index-d03136d4.js +711 -0
  319. package/_verture/index-e2881a53.js +16 -0
  320. package/_verture/intl-5cbb940c.js +57 -0
  321. package/_verture/modalContext-92bb0e16.js +201 -0
  322. package/_verture/slicedToArray-76060636.js +43 -0
  323. package/_verture/sortable.esm-49896035.js +3791 -0
  324. package/_verture/style-inject.es-300983ab.js +28 -0
  325. package/_verture/toConsumableArray-81040c9e.js +19 -0
  326. package/_verture/tslib.es6-55ed4bd2.js +38 -0
  327. package/_verture/typeof-498dd2b1.js +11 -0
  328. package/_verture/unsupportedIterableToArray-cb478f24.js +16 -0
  329. package/_verture/useFormatMessage-703f8b20.js +20 -0
  330. package/_verture/useGlobalProps-1b846a65.js +11 -0
  331. package/_verture/usePopupContainer-87febeb9.js +68 -0
  332. package/_verture/util-7e1fb1e2.js +18 -0
  333. package/index.d.ts +144 -0
  334. package/index.js +180 -0
  335. package/package.json +1 -1
  336. package/umd/AutoBox.js +43 -0
  337. package/umd/AutoTips.js +15 -0
  338. package/umd/Breadcrumbs.js +42 -0
  339. package/umd/Button.js +43 -0
  340. package/umd/ButtonGroup.js +43 -0
  341. package/umd/Carousel.js +6 -0
  342. package/umd/Cascader.js +43 -0
  343. package/umd/Checkbox.js +42 -0
  344. package/umd/CheckboxGroup.js +42 -0
  345. package/umd/Collapse.js +43 -0
  346. package/umd/CollapseBox.js +1 -0
  347. package/umd/CollapseLayout.js +29 -0
  348. package/umd/ColorPicker.js +1 -0
  349. package/umd/ComboSelect.js +42 -0
  350. package/umd/Container.js +1 -0
  351. package/umd/DatePicker.js +42 -0
  352. package/umd/Desktop.js +42 -0
  353. package/umd/DragVerify.js +28 -0
  354. package/umd/Drawer.js +43 -0
  355. package/umd/Dropdown.js +15 -0
  356. package/umd/DynamicMultiBox.js +54 -0
  357. package/umd/Empty.js +15 -0
  358. package/umd/Form.js +42 -0
  359. package/umd/FormItem.js +42 -0
  360. package/umd/FunctionModal.js +42 -0
  361. package/umd/GlobalContext.js +1 -0
  362. package/umd/Help.js +42 -0
  363. package/umd/HelperText.js +1 -0
  364. package/umd/InputLang.js +42 -0
  365. package/umd/InputNumber.js +42 -0
  366. package/umd/Label.js +42 -0
  367. package/umd/Loading.js +29 -0
  368. package/umd/Menu.js +29 -0
  369. package/umd/Message.js +30 -0
  370. package/umd/Modal.js +42 -0
  371. package/umd/MultiBox.js +42 -0
  372. package/umd/Notification.js +43 -0
  373. package/umd/OperateBtn.js +42 -0
  374. package/umd/PageHeader.js +42 -0
  375. package/umd/Pagination.js +42 -0
  376. package/umd/ParauiProvider.js +15 -0
  377. package/umd/PasswordRules.js +29 -0
  378. package/umd/PopConfirm.js +42 -0
  379. package/umd/Popover.js +15 -0
  380. package/umd/Progress.js +35 -0
  381. package/umd/Querying.js +15 -0
  382. package/umd/Radio.js +42 -0
  383. package/umd/RadioGroup.js +42 -0
  384. package/umd/Search.js +42 -0
  385. package/umd/Select.js +42 -0
  386. package/umd/SelectInput.js +42 -0
  387. package/umd/Selector.js +42 -0
  388. package/umd/SelectorPicker.js +42 -0
  389. package/umd/SingleBox.js +42 -0
  390. package/umd/Slider.js +15 -0
  391. package/umd/Split.js +1 -0
  392. package/umd/Status.js +1 -0
  393. package/umd/Stepper.js +42 -0
  394. package/umd/Switch.js +42 -0
  395. package/umd/Table.js +42 -0
  396. package/umd/Tabs.js +42 -0
  397. package/umd/Tag.js +43 -0
  398. package/umd/TextEditor.js +205 -0
  399. package/umd/TextField.js +42 -0
  400. package/umd/TimePicker.js +42 -0
  401. package/umd/Timeline.js +1 -0
  402. package/umd/Title.js +1 -0
  403. package/umd/ToggleButton.js +43 -0
  404. package/umd/Tooltip.js +15 -0
  405. package/umd/Transfer.js +49 -0
  406. package/umd/Tree.js +42 -0
  407. package/umd/Upload.js +56 -0
@@ -0,0 +1,141 @@
1
+ /**
2
+ * @author linhd
3
+ * @date 2021/8/10 14:24
4
+ * @description 菜单参数
5
+ */
6
+ import React, { ReactNode } from 'react';
7
+ /** 菜单类型 */
8
+ export type MenuListTypeType = 'redirect' | 'router' | "iframe" | "snack" | "snackPage";
9
+ /** color类型 */
10
+ export type ColorType = 'deep' | 'light';
11
+ /** logo参数 */
12
+ export interface LogoProps {
13
+ /** 展开 / 收起 */
14
+ expansion?: boolean;
15
+ /** 自定义内容 */
16
+ render?: ReactNode;
17
+ /** 样式class */
18
+ className?: string;
19
+ }
20
+ /** 菜单列表项参数 */
21
+ export interface MenuChildrenProps {
22
+ /** 样式class */
23
+ className?: string;
24
+ /** 菜单名 */
25
+ label?: ReactNode;
26
+ /** 菜单类型 */
27
+ type?: MenuListTypeType;
28
+ /** 菜单路径 */
29
+ path?: string;
30
+ /** href a标签地址 */
31
+ href?: string;
32
+ /** 菜单图标 */
33
+ icon?: ReactNode;
34
+ /** 菜单组件 */
35
+ component?: any;
36
+ /** 子菜单 */
37
+ children?: MenuChildrenProps[];
38
+ /** 菜单最后一层所有上下级 一条线 */
39
+ idMenuLast?: any;
40
+ /** 当前选中菜单 */
41
+ selectMenu?: string;
42
+ /** 点击菜单 */
43
+ onClickMenu?: (item: MenuChildrenProps | false) => void;
44
+ /** 选中菜单,是否收起其他展开项 */
45
+ shrinkOthers?: boolean;
46
+ /** 唯一值,内部属性,自动生成 */
47
+ _paraui_menu_id?: string;
48
+ /** 是否第一级 */
49
+ _paraui_menu_first?: boolean;
50
+ [name: string]: any;
51
+ }
52
+ /** 菜单列表参数 */
53
+ export interface MenuListProps {
54
+ /** 颜色 */
55
+ color?: ColorType;
56
+ /** 展开 / 收起 */
57
+ expansion?: boolean;
58
+ /** 菜单列表参数 */
59
+ list?: MenuChildrenProps[];
60
+ /** 当前选中菜单 */
61
+ selectMenu?: string;
62
+ /** 点击菜单 */
63
+ onClickMenu?: (item: MenuChildrenProps | false) => void;
64
+ /** 样式class */
65
+ className?: string;
66
+ /** 选中菜单,是否收起其他展开项 */
67
+ shrinkOthers?: boolean;
68
+ [name: string]: any;
69
+ }
70
+ /** 弹出菜单 */
71
+ export interface MenuItemPopoverProps {
72
+ /** 打开 */
73
+ open?: boolean;
74
+ /** 定位元素, 自定义属性 paraui-menu-id */
75
+ anchorEl?: string;
76
+ /** 菜单列表 */
77
+ list?: MenuChildrenProps[];
78
+ /** 菜单最后一层所有上下级 一条线 */
79
+ idMenuLast?: any;
80
+ /** 当前选中菜单 */
81
+ selectMenu?: string;
82
+ /** 点击菜单 */
83
+ onClickMenu?: (item: MenuChildrenProps | false) => void;
84
+ /** 层级 */
85
+ level?: number;
86
+ /** 鼠标移入 */
87
+ onMouseEnter?: Function;
88
+ /** 鼠标移出 */
89
+ onMouseLeave: Function;
90
+ onMouseEnterBus?: Function;
91
+ onMouseLeaveBus?: Function;
92
+ /** 主题色 */
93
+ color?: ColorType;
94
+ className?: string;
95
+ [name: string]: any;
96
+ }
97
+ /** 尾部展开 */
98
+ export interface FooterExpansionProps {
99
+ /** 是否展开 */
100
+ expansion?: boolean;
101
+ /** 展开图标 */
102
+ expandIcon?: ReactNode;
103
+ /** 收起图标 */
104
+ shrinkIcon?: ReactNode;
105
+ /** 自定义尾部 */
106
+ render?: ReactNode;
107
+ /** 样式class */
108
+ className?: string;
109
+ /** 展开事件 */
110
+ clickExpansion?: (bol: boolean) => void;
111
+ /** 版本号 */
112
+ version?: ReactNode;
113
+ [name: string]: any;
114
+ }
115
+ /** 菜单参数 */
116
+ export interface MenuProps {
117
+ /** 样式class */
118
+ className?: string;
119
+ /** style */
120
+ style?: React.CSSProperties;
121
+ /** 颜色 */
122
+ color?: ColorType;
123
+ /** 展开 / 收起 */
124
+ expansion?: boolean;
125
+ /** 当前选中菜单 */
126
+ selectMenu?: string;
127
+ /** 选中菜单,是否收起其他展开项 */
128
+ shrinkOthers?: boolean;
129
+ /** 显示收缩按钮 */
130
+ showExpansion?: boolean;
131
+ /** logo配置 */
132
+ logoProps?: LogoProps;
133
+ /** 菜单配置 */
134
+ menuListProps?: MenuListProps;
135
+ /** 尾部展开参数 */
136
+ footerExpansionProps?: FooterExpansionProps;
137
+ /** 展开事件 */
138
+ onClickExpansion?: (bol: boolean) => void;
139
+ /** 点击菜单 */
140
+ onClickMenu?: (item: MenuChildrenProps | false) => void;
141
+ }
package/Menu/logo.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @author linhd
3
+ * @date 2021/8/10 16:35
4
+ * @description 菜单图标
5
+ */
6
+ import { FunctionComponent } from 'react';
7
+ import { LogoProps } from './interface';
8
+ export declare const Logo: FunctionComponent<LogoProps>;
9
+ export default Logo;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @author linhd
3
+ * @date 2021/8/10 17:54
4
+ * @description 竖向菜单
5
+ */
6
+ import { FunctionComponent } from 'react';
7
+ import { MenuListProps } from './interface';
8
+ /** 上下箭头 */
9
+ export type FlipDisable = {
10
+ prev: boolean;
11
+ next: boolean;
12
+ };
13
+ export declare const VerticalMenuList: FunctionComponent<MenuListProps>;
14
+ export default VerticalMenuList;
@@ -0,0 +1,99 @@
1
+ /**
2
+ * @author Hanz
3
+ * @date 2021/8/5 下午8:04
4
+ * @description message 全局提示
5
+ */
6
+ import React from 'react';
7
+ import './index.scss';
8
+ type MsgType = 'info' | 'warn' | 'error' | 'success';
9
+ interface InternalMsgConfig {
10
+ /** 消息id */
11
+ id?: string;
12
+ /** 是否启用html渲染内容 */
13
+ html?: boolean;
14
+ /** 是否强制显示关闭按钮,默认自动当延迟关闭事件为0或null时自动显示 */
15
+ close?: boolean;
16
+ /** 消息文本 */
17
+ text: string;
18
+ /** 图标 */
19
+ icon?: any;
20
+ /** 内部消息类型 */
21
+ type: MsgType;
22
+ /** 最大显示数 */
23
+ maxCount?: number;
24
+ /** 描述 */
25
+ desc?: string;
26
+ /** 是否隐藏图标 */
27
+ hideIcon?: boolean;
28
+ /** 样式类名 */
29
+ className?: string;
30
+ /** 样式 */
31
+ style?: React.CSSProperties;
32
+ }
33
+ interface MsgGlobalConfig {
34
+ /**
35
+ * 最大显示数
36
+ */
37
+ maxCount?: number;
38
+ /**
39
+ * 时长
40
+ */
41
+ duration?: number;
42
+ }
43
+ export declare const MessageBar: React.FC<InternalMsgConfig>;
44
+ declare const _default: () => JSX.Element;
45
+ export default _default;
46
+ export type MsgTypeProps = {
47
+ /**是否启用html渲染内容*/
48
+ html?: boolean;
49
+ /**是否强制显示关闭按钮,默认自动当延迟关闭事件为0或null时自动显示*/
50
+ close?: boolean;
51
+ /**
52
+ * 消息文本
53
+ */
54
+ text?: string;
55
+ /**
56
+ * 图标
57
+ */
58
+ icon?: any;
59
+ /**
60
+ * 最大显示数
61
+ */
62
+ maxCount?: number;
63
+ /**
64
+ * 描述
65
+ */
66
+ desc?: string;
67
+ /**
68
+ * 隐藏默认图标
69
+ */
70
+ hideIcon?: boolean;
71
+ /**
72
+ * cls
73
+ */
74
+ className?: string;
75
+ /**
76
+ * style
77
+ */
78
+ style?: React.CSSProperties;
79
+ };
80
+ interface MsgPorps {
81
+ (config: string | MsgTypeProps, duration?: number): void;
82
+ }
83
+ export interface MessageObject {
84
+ /**信息*/
85
+ info: MsgPorps;
86
+ /**警告*/
87
+ warn: MsgPorps;
88
+ /**错误*/
89
+ error: MsgPorps;
90
+ /**成功*/
91
+ success: MsgPorps;
92
+ /** 清除所有 */
93
+ clear?: () => void;
94
+ /** 销毁所有,兼容写法 */
95
+ destroyAll?: () => void;
96
+ /** 全局配置 */
97
+ config?: (config: MsgGlobalConfig) => void;
98
+ }
99
+ export declare const Message: MessageObject;
@@ -0,0 +1,246 @@
1
+ import { _ as _typeof } from '../_verture/typeof-498dd2b1.js';
2
+ import { _ as _toConsumableArray } from '../_verture/toConsumableArray-81040c9e.js';
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { useEffect } from 'react';
5
+ import ReactDOM from 'react-dom';
6
+ import WarningCircleF from '@para-ui/icons/WarningCircleF';
7
+ import CompleteIcon from '@para-ui/icons/CheckCircleF';
8
+ import CloseIcon from '@para-ui/icons/Close';
9
+ import CloseCircleFilled from '@para-ui/icons/CloseCircleF';
10
+ import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
11
+ import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
12
+ import '../_verture/unsupportedIterableToArray-cb478f24.js';
13
+
14
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/1 下午5:48\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-message-box {\n /*从上到下进入*/\n /*从上到下*/\n}\n.paraui-v3-message-box--message-float {\n position: fixed;\n top: 3%;\n left: 0;\n z-index: 9999;\n text-align: center;\n width: 100%;\n pointer-events: none;\n}\n.paraui-v3-message-box .msg-item .msg-wrapper {\n position: relative;\n display: inline-block;\n margin: 10px auto;\n min-height: 44px;\n padding: 12px 16px;\n border-radius: 4px;\n font-size: 14px;\n text-align: left;\n}\n.paraui-v3-message-box .msg-item .msg-icon {\n position: absolute;\n top: 15px;\n left: 16px;\n line-height: 0;\n}\n.paraui-v3-message-box .msg-item .msg-icon svg {\n font-size: 14px;\n color: currentColor;\n}\n.paraui-v3-message-box .msg-item .msg-text {\n display: inline-block;\n max-width: 60vw;\n word-wrap: break-word;\n margin-right: 32px;\n margin-left: 22px;\n line-height: 20px;\n word-break: break-all;\n}\n.paraui-v3-message-box .msg-item .msg-text--title {\n font-weight: 700;\n}\n.paraui-v3-message-box .msg-item .msg-text--noicon {\n margin-left: 0;\n}\n.paraui-v3-message-box .msg-item .msg-text .msg-desc {\n display: block;\n margin-top: 8px;\n font-weight: 400;\n word-wrap: break-word;\n}\n.paraui-v3-message-box .msg-item .msg-close {\n position: absolute;\n right: 16px;\n top: 15px;\n cursor: pointer;\n line-height: 0;\n pointer-events: auto;\n}\n.paraui-v3-message-box .msg-item .msg-close svg {\n font-size: 14px;\n color: currentColor;\n}\n.paraui-v3-message-box .msg-item-fill .msg-wrapper {\n width: 100%;\n}\n.paraui-v3-message-box .msg-info {\n background-color: rgb(243, 246, 252);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-message-box .msg-info .msg-close {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-message-box .msg-warn {\n background-color: rgb(254, 249, 245);\n color: rgb(255, 161, 80);\n}\n.paraui-v3-message-box .msg-warn .msg-close {\n color: rgb(255, 161, 80);\n}\n.paraui-v3-message-box .msg-error {\n background-color: rgb(253, 246, 245);\n color: rgb(235, 96, 84);\n}\n.paraui-v3-message-box .msg-error .msg-close {\n color: rgb(235, 96, 84);\n}\n.paraui-v3-message-box .msg-success {\n background-color: rgb(245, 251, 242);\n color: rgb(83, 195, 27);\n}\n.paraui-v3-message-box .msg-success .msg-close {\n color: rgb(83, 195, 27);\n}\n.paraui-v3-message-box .message-fadeInDown {\n animation-duration: 0.5s;\n animation-name: messageFadeInDown;\n}\n@keyframes messageFadeInDown {\n from {\n opacity: 0;\n transform: translate(0, -50px); /* 标准语法 */\n }\n to {\n opacity: 1;\n transform: translate(0, 0); /* 标准语法 */\n }\n}";
15
+ styleInject(css_248z);
16
+
17
+ //图标map
18
+ var iconMapping = {
19
+ 'info': jsx(WarningCircleF, {}),
20
+ 'warn': jsx(WarningCircleF, {}),
21
+ 'error': jsx(CloseCircleFilled, {}),
22
+ 'success': jsx(CompleteIcon, {})
23
+ };
24
+ //获取window
25
+ var getMsgWindow = function getMsgWindow() {
26
+ return window === window.top ? window : window.top;
27
+ };
28
+ //消息内容模板
29
+ var template = function template(_ref) {
30
+ var icon = _ref.icon,
31
+ text = _ref.text,
32
+ id = _ref.id,
33
+ type = _ref.type,
34
+ html = _ref.html,
35
+ close = _ref.close,
36
+ desc = _ref.desc,
37
+ hideIcon = _ref.hideIcon;
38
+ var item = document.createElement('div');
39
+ item.className = "msg-item";
40
+ item.id = id || "";
41
+ item.innerHTML = "<div class=\"msg-wrapper message-fadeInDown msg-".concat(type, "\">\n ").concat(icon ? "<div class=\"msg-icon\"></div>" : '', "\n <div class=\"msg-text\"></div>\n ").concat(close ? "<div class=\"msg-close\"></div>" : '', "\n </div>\n ");
42
+ var msgBox = item.querySelector('.msg-text');
43
+ if (!msgBox) return item;
44
+ if (html) msgBox.innerHTML = text;else msgBox.textContent = text;
45
+ //描述
46
+ if (desc) {
47
+ var span = document.createElement('span');
48
+ span.className = 'msg-desc';
49
+ span.textContent = desc || '';
50
+ msgBox.classList.add('msg-text--title');
51
+ msgBox.appendChild(span);
52
+ }
53
+ if (hideIcon) {
54
+ msgBox.classList.add('msg-text--noicon');
55
+ }
56
+ var msgClose = item.querySelector('.msg-close');
57
+ if (msgClose) msgClose.addEventListener('click', function () {
58
+ var _a;
59
+ var hasNode = document.querySelector("#".concat(id));
60
+ if (hasNode) {
61
+ (_a = item === null || item === void 0 ? void 0 : item.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(item);
62
+ item = null;
63
+ }
64
+ });
65
+ return item;
66
+ };
67
+ var MessageBar = function MessageBar(props) {
68
+ var className = props.className,
69
+ style = props.style,
70
+ type = props.type;
71
+ var pId = createParentId();
72
+ var mId = getMsgId();
73
+ var cls = getParentClassName(props.className || "");
74
+ if (className) cls += " ".concat(className);
75
+ useEffect(function () {
76
+ var parent = document.getElementById(pId);
77
+ renderContent(parent, Object.assign(Object.assign({}, props), {
78
+ id: mId,
79
+ icon: iconMapping[type]
80
+ }), 0, false, true);
81
+ return function () {
82
+ var hasNode = document.querySelector("#".concat(mId));
83
+ if (hasNode) {
84
+ parent === null || parent === void 0 ? void 0 : parent.removeChild(hasNode);
85
+ }
86
+ };
87
+ }, _toConsumableArray(Object.values(props)));
88
+ return jsx("div", {
89
+ id: pId,
90
+ className: cls,
91
+ style: style
92
+ });
93
+ };
94
+ var createParentId = function createParentId() {
95
+ return "msgbox_" + String(Math.random() * 100000 | 0 + new Date().getTime());
96
+ };
97
+ //消息box id
98
+ var parentId = createParentId();
99
+ //message mountNode
100
+ var index = (function () {
101
+ return jsx("div", {
102
+ className: "".concat($prefixCls, "-message-box"),
103
+ id: parentId
104
+ });
105
+ });
106
+ //渲染msg 内容
107
+ var renderContent = function renderContent(box, _ref2, removeTime, autoClose, fill) {
108
+ var icon = _ref2.icon,
109
+ text = _ref2.text,
110
+ id = _ref2.id,
111
+ type = _ref2.type,
112
+ html = _ref2.html,
113
+ close = _ref2.close,
114
+ desc = _ref2.desc,
115
+ hideIcon = _ref2.hideIcon;
116
+ var item = template({
117
+ id: id,
118
+ text: text,
119
+ icon: icon,
120
+ type: type,
121
+ html: html,
122
+ close: close,
123
+ desc: desc,
124
+ hideIcon: hideIcon
125
+ });
126
+ if (fill && item) item.classList.add("msg-item-fill");
127
+ box === null || box === void 0 ? void 0 : box.appendChild(item);
128
+ var iconDom = document.querySelector("#".concat(id, " .msg-icon"));
129
+ if (iconDom && icon && !hideIcon) ReactDOM.render(icon, iconDom);
130
+ var closeDom = document.querySelector("#".concat(id, " .msg-close"));
131
+ if (closeDom) ReactDOM.render(jsx(CloseIcon, {}), closeDom);
132
+ if (!autoClose) return;
133
+ setTimeout(function () {
134
+ var hasNode = document.querySelector("#".concat(item.id));
135
+ if (hasNode) box === null || box === void 0 ? void 0 : box.removeChild(item);
136
+ }, removeTime);
137
+ };
138
+ //message 构造方法
139
+ var Msg = function Msg(config, removeTime, type, parentId) {
140
+ var _a, _b;
141
+ var getMsgConf = function getMsgConf() {
142
+ var _win = getMsgWindow();
143
+ return _win['__msg_conf__'] || {};
144
+ };
145
+ var icon = iconMapping[type],
146
+ text = '',
147
+ desc = '',
148
+ html = false,
149
+ close,
150
+ hideIcon = false,
151
+ maxCount = (_a = getMsgConf().maxCount) !== null && _a !== void 0 ? _a : Infinity,
152
+ duration = (_b = getMsgConf().duration) !== null && _b !== void 0 ? _b : removeTime,
153
+ className = '';
154
+ var autoClose = !isNaN(duration) && duration > 0;
155
+ if (typeof config === "string") text = config;else if (_typeof(config) === "object") {
156
+ text = config.text || '';
157
+ desc = config.desc;
158
+ icon = config.icon || iconMapping[type];
159
+ html = config.html || false;
160
+ hideIcon = config.hideIcon || false;
161
+ if (config.maxCount > 0) maxCount = config.maxCount || Infinity;
162
+ }
163
+ if (_typeof(config) === "object" && typeof config.close === "boolean") close = config.close;else close = !autoClose;
164
+ var parent = document.getElementById(parentId);
165
+ if (!parent) {
166
+ parent = document.createElement('div');
167
+ parent.id = parentId;
168
+ document.body.appendChild(parent);
169
+ }
170
+ parent.className = getParentClassName(className);
171
+ parent.className += ' ' + "".concat($prefixCls, "-message-box--message-float");
172
+ var id = getMsgId();
173
+ renderContent(parent, {
174
+ id: id,
175
+ text: text,
176
+ icon: icon,
177
+ type: type,
178
+ html: html,
179
+ close: close,
180
+ desc: desc,
181
+ hideIcon: hideIcon
182
+ }, duration, autoClose);
183
+ dropEleWhenExceedLimit(parent, maxCount);
184
+ };
185
+ var getParentClassName = function getParentClassName(className) {
186
+ return "".concat($prefixCls, "-message-box").concat(className ? ' ' + className : '');
187
+ };
188
+ var getMsgId = function getMsgId() {
189
+ return 'msgitem_' + String(Math.random() * 100000 | 0 + new Date().getTime());
190
+ };
191
+ //超出maxCount 删除之前元素
192
+ var dropEleWhenExceedLimit = function dropEleWhenExceedLimit(parent, maxCount) {
193
+ var _a, _b;
194
+ if (!parent || !((_a = parent.children) === null || _a === void 0 ? void 0 : _a.length)) return;
195
+ var child = parent.children;
196
+ var len = child.length;
197
+ if (len > maxCount) {
198
+ for (var i = 0; i < len; i++) {
199
+ if (i < maxCount && child[i]) {
200
+ (_b = child[i].parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(child[i]);
201
+ }
202
+ }
203
+ }
204
+ };
205
+ //清除所有msg
206
+ var clearFunc = function clearFunc(parentId) {
207
+ var parent = document.getElementById(parentId);
208
+ if (!parent) return;
209
+ parent.innerHTML = '';
210
+ };
211
+ //msg 全局配置
212
+ var msgConfig = function msgConfig() {
213
+ var conf = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
214
+ var _win = getMsgWindow();
215
+ _win.__msg_conf__ = conf;
216
+ };
217
+ //message
218
+ var Message = {
219
+ info: function info(config) {
220
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
221
+ return Msg(config, duration, 'info', parentId);
222
+ },
223
+ warn: function warn(config) {
224
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
225
+ return Msg(config, duration, 'warn', parentId);
226
+ },
227
+ error: function error(config) {
228
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
229
+ return Msg(config, duration, 'error', parentId);
230
+ },
231
+ success: function success(config) {
232
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
233
+ return Msg(config, duration, 'success', parentId);
234
+ },
235
+ clear: function clear() {
236
+ return clearFunc(parentId);
237
+ },
238
+ destroyAll: function destroyAll() {
239
+ return clearFunc(parentId);
240
+ },
241
+ config: function config(_config) {
242
+ return msgConfig(_config);
243
+ }
244
+ };
245
+
246
+ export { Message, MessageBar, index as default };
@@ -0,0 +1,65 @@
1
+ import { ReactNode } from "react";
2
+ import { ButtonProps } from "../../Button";
3
+ import './index.scss';
4
+ type ConfirmType = "success" | "info" | "error" | "warn" | "warning";
5
+ interface ConfirmDialogProps {
6
+ /**图标类型*/
7
+ type?: ConfirmType;
8
+ /**打开*/
9
+ open?: boolean;
10
+ /**标题*/
11
+ title?: ReactNode;
12
+ /**内容*/
13
+ content?: ReactNode;
14
+ /**自定义图标*/
15
+ icon?: ReactNode;
16
+ /**ok文本*/
17
+ okText?: string;
18
+ /**cancel文本*/
19
+ cancelText?: string;
20
+ /**底部操作栏*/
21
+ actions?: ReactNode;
22
+ /**是否显示actions*/
23
+ showActions?: boolean;
24
+ /**确定回调*/
25
+ onOk?: Function;
26
+ /**取消回调*/
27
+ onCancel?: Function;
28
+ /**cls*/
29
+ className?: string;
30
+ /**confirm 宽度*/
31
+ width?: string | number;
32
+ /**显示取消按钮*/
33
+ showCancel?: boolean;
34
+ /**显示关闭按钮*/
35
+ closable?: boolean;
36
+ /**禁用backdrop点击*/
37
+ disableBackdropClick?: boolean;
38
+ /**禁用esc键*/
39
+ disableEscapeKeyDown?: boolean;
40
+ /**确定按钮属性*/
41
+ okButtonProps?: ButtonProps;
42
+ /**取消按钮属性*/
43
+ cancelButtonProps?: ButtonProps;
44
+ /**promise resolve*/
45
+ resolveFn?: Function;
46
+ /**确定时回调*/
47
+ callback?: Function;
48
+ /**销毁方法*/
49
+ destroy?: Function;
50
+ }
51
+ type ConfirmProps = Omit<ConfirmDialogProps, 'open' | 'resolveFn' | 'destroy' | 'callback'> & {
52
+ uuid?: string;
53
+ };
54
+ interface ConfirmFn {
55
+ (config: ConfirmProps | string, callback?: Function): void | Promise<any>;
56
+ }
57
+ export interface ConfirmObject {
58
+ info: ConfirmFn;
59
+ warn: ConfirmFn;
60
+ error: ConfirmFn;
61
+ success: ConfirmFn;
62
+ destroyAll?: (uuid?: string) => void;
63
+ }
64
+ export declare const Confirm: ConfirmObject;
65
+ export {};
@@ -0,0 +1,99 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { ButtonProps } from '../Button';
3
+ import { Confirm, ConfirmObject } from "./Confirm";
4
+ import './index.scss';
5
+ type ModalSize = 'sm' | 'md' | 'lg' | 'auto' | 'fullScreen';
6
+ export interface ModalProps {
7
+ /** 对话框是否可见 */
8
+ visible?: boolean;
9
+ /** 打开 */
10
+ open?: boolean;
11
+ /** 确定按钮 loading */
12
+ confirmLoading?: boolean;
13
+ /** 标题 */
14
+ title?: ReactNode;
15
+ /** 内容 */
16
+ children?: ReactNode;
17
+ /** 对话框头部 */
18
+ header?: ReactNode;
19
+ /** 隐藏对话框头部 */
20
+ hideHeader?: boolean;
21
+ /** 底部操作栏 */
22
+ actions?: ((buttons: ReactNode[]) => ReactNode[]) | ReactNode;
23
+ /** 底部内容 */
24
+ footer?: ((buttons: ReactNode[]) => ReactNode[]) | ReactNode;
25
+ /** 是否显示actions */
26
+ showActions?: boolean;
27
+ /** 显示取消按钮 */
28
+ showCancel?: boolean;
29
+ /** 是否显示右上角的关闭按钮 */
30
+ closable?: boolean;
31
+ /** 点击确定回调 */
32
+ onOk?: (e?: React.MouseEvent<HTMLElement>) => void;
33
+ /** 点击模态框右上角叉、取消按钮,return false 不关闭 */
34
+ onCancel?: (e?: React.MouseEvent<HTMLElement>) => boolean | void;
35
+ afterClose?: () => void;
36
+ /** 大小 */
37
+ size?: ModalSize;
38
+ /** 垂直居中 */
39
+ centered?: boolean;
40
+ /** 宽度 */
41
+ width?: string | number;
42
+ /** 确认按钮文字 */
43
+ okText?: ReactNode;
44
+ /** 确认按钮类型 */
45
+ okType?: string;
46
+ /** 取消按钮文字 */
47
+ cancelText?: ReactNode;
48
+ /** 点击蒙层是否允许关闭 */
49
+ maskClosable?: boolean;
50
+ disableBackdropClick?: boolean;
51
+ /** 强制渲染 Modal */
52
+ forceRender?: boolean;
53
+ /** 确定按钮属性 */
54
+ okButtonProps?: ButtonProps;
55
+ /** 取消按钮属性 */
56
+ cancelButtonProps?: ButtonProps;
57
+ /** 关闭时是否销毁 */
58
+ destroyOnClose?: boolean;
59
+ /** style */
60
+ style?: React.CSSProperties;
61
+ /** 包裹classname */
62
+ wrapClassName?: string;
63
+ /** cls */
64
+ className?: string;
65
+ /** 渲染容器 */
66
+ getContainer?: string | HTMLElement | (() => HTMLElement) | false;
67
+ /** 设置z-index */
68
+ zIndex?: number;
69
+ /** body样式 */
70
+ bodyStyle?: React.CSSProperties;
71
+ /** mask样式 */
72
+ maskStyle?: React.CSSProperties;
73
+ /** 是否显示遮罩 */
74
+ mask?: boolean;
75
+ /** 是否支持键盘esc关闭 */
76
+ keyboard?: boolean;
77
+ disableEscapeKeyDown?: boolean;
78
+ /** 右上角关闭图标 */
79
+ closeIcon?: ReactNode;
80
+ /** 自定义渲染对话框 */
81
+ modalRender?: (node: ReactNode) => ReactNode;
82
+ /** 对话框关闭后是否需要聚焦触发元素 */
83
+ focusTriggerAfterClose?: boolean;
84
+ /** 是否全屏 */
85
+ fullScreen?: boolean;
86
+ /** 自定义大小 */
87
+ customizeSize?: React.CSSProperties;
88
+ /** 内容宽度 */
89
+ contentWidth?: number | string;
90
+ /** 内容高度 */
91
+ contentHeight?: number | string;
92
+ /** 内容样式 */
93
+ contentStyle?: React.CSSProperties;
94
+ [name: string]: any;
95
+ }
96
+ export declare const Modal: React.FC<ModalProps>;
97
+ export { Confirm };
98
+ export type { ConfirmObject };
99
+ export default Modal;