@para-ui/core 2.2.4 → 2.2.5-beta

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 (353) hide show
  1. package/AutoBox/index.d.ts +12 -6
  2. package/AutoBox/index.js +203 -15
  3. package/AutoTips/index.d.ts +12 -6
  4. package/AutoTips/index.js +84 -15
  5. package/Breadcrumbs/index.d.ts +13 -7
  6. package/Breadcrumbs/index.js +227 -15
  7. package/Button/index.d.ts +92 -11
  8. package/Button/index.js +348 -14
  9. package/ButtonGroup/index.d.ts +21 -9
  10. package/ButtonGroup/index.js +128 -14
  11. package/Carousel/index.d.ts +17 -11
  12. package/Carousel/index.js +74 -15
  13. package/Cascader/index.d.ts +12 -7
  14. package/Cascader/index.js +166 -15
  15. package/Checkbox/index.d.ts +13 -7
  16. package/Checkbox/index.js +105 -14
  17. package/CheckboxGroup/index.d.ts +15 -9
  18. package/CheckboxGroup/index.js +138 -14
  19. package/Collapse/index.d.ts +49 -14
  20. package/Collapse/index.js +171 -15
  21. package/CollapseBox/index.d.ts +11 -5
  22. package/CollapseBox/index.js +164 -15
  23. package/ColorPicker/index.d.ts +4 -4
  24. package/ColorPicker/index.js +4 -1
  25. package/ComboSelect/index.d.ts +306 -6
  26. package/ComboSelect/index.js +1803 -14
  27. package/Container/index.d.ts +13 -8
  28. package/Container/index.js +239 -15
  29. package/DatePicker/index.d.ts +30 -17
  30. package/DatePicker/index.js +733 -14
  31. package/Desktop/index.d.ts +14 -6
  32. package/Desktop/index.js +853 -14
  33. package/Drawer/index.d.ts +92 -6
  34. package/Drawer/index.js +186 -14
  35. package/Dropdown/index.d.ts +29 -0
  36. package/Dropdown/index.js +67 -0
  37. package/Empty/index.d.ts +16 -10
  38. package/Empty/index.js +644 -14
  39. package/Form/index.d.ts +11 -9
  40. package/Form/index.js +384 -14
  41. package/FormItem/index.d.ts +5 -152
  42. package/FormItem/index.js +81 -14
  43. package/FunctionModal/index.d.ts +14 -3
  44. package/FunctionModal/index.js +39 -14
  45. package/GlobalContext/index.d.ts +38 -8
  46. package/GlobalContext/index.js +41 -16
  47. package/Help/index.d.ts +16 -10
  48. package/Help/index.js +39 -15
  49. package/HelperText/index.d.ts +11 -5
  50. package/HelperText/index.js +29 -15
  51. package/InputLang/index.d.ts +13 -7
  52. package/InputLang/index.js +270 -14
  53. package/InputNumber/index.d.ts +16 -10
  54. package/InputNumber/index.js +308 -14
  55. package/Label/index.d.ts +12 -6
  56. package/Label/index.js +81 -14
  57. package/Loading/index.d.ts +12 -6
  58. package/Loading/index.js +47 -15
  59. package/Menu/index.d.ts +123 -5
  60. package/Menu/index.js +1232 -14
  61. package/Message/index.d.ts +11 -5
  62. package/Message/index.js +222 -15
  63. package/Modal/index.d.ts +142 -40
  64. package/Modal/index.js +443 -14
  65. package/MultiBox/index.d.ts +13 -7
  66. package/MultiBox/index.js +231 -14
  67. package/Notification/index.d.ts +22 -16
  68. package/Notification/index.js +266 -15
  69. package/OperateBtn/index.d.ts +16 -10
  70. package/OperateBtn/index.js +260 -14
  71. package/PageHeader/index.d.ts +178 -5
  72. package/PageHeader/index.js +1171 -14
  73. package/Pagination/index.d.ts +12 -6
  74. package/Pagination/index.js +469 -14
  75. package/ParauiProvider/index.d.ts +9 -8
  76. package/ParauiProvider/index.js +53 -15
  77. package/PopConfirm/index.d.ts +23 -10
  78. package/PopConfirm/index.js +189 -14
  79. package/Popover/index.d.ts +18 -11
  80. package/Popover/index.js +66 -15
  81. package/Progress/index.d.ts +18 -12
  82. package/Progress/index.js +358 -20
  83. package/Querying/index.d.ts +15 -9
  84. package/Querying/index.js +762 -14
  85. package/Radio/index.d.ts +13 -7
  86. package/Radio/index.js +94 -14
  87. package/RadioGroup/index.d.ts +15 -9
  88. package/RadioGroup/index.js +128 -14
  89. package/Search/index.d.ts +18 -12
  90. package/Search/index.js +220 -14
  91. package/Select/index.d.ts +13 -7
  92. package/Select/index.js +1288 -14
  93. package/SelectInput/index.d.ts +11 -5
  94. package/SelectInput/index.js +51 -14
  95. package/SingleBox/index.d.ts +13 -7
  96. package/SingleBox/index.js +194 -14
  97. package/Slider/index.d.ts +104 -7
  98. package/Slider/index.js +125 -15
  99. package/Split/index.d.ts +8 -3
  100. package/Split/index.js +134 -15
  101. package/Stepper/index.d.ts +41 -25
  102. package/Stepper/index.js +99 -15
  103. package/Switch/index.d.ts +16 -10
  104. package/Switch/index.js +73 -14
  105. package/Table/index.d.ts +12 -4
  106. package/Table/index.js +2725 -14
  107. package/Tabs/index.d.ts +64 -29
  108. package/Tabs/index.js +218 -14
  109. package/Tag/index.d.ts +78 -12
  110. package/Tag/index.js +286 -14
  111. package/Test/index.d.ts +3 -2
  112. package/Test/index.js +9 -16
  113. package/TextField/index.d.ts +22 -16
  114. package/TextField/index.js +686 -14
  115. package/TimePicker/index.d.ts +20 -10
  116. package/TimePicker/index.js +77 -14
  117. package/Timeline/index.d.ts +49 -13
  118. package/Timeline/index.js +150 -15
  119. package/ToggleButton/index.d.ts +61 -10
  120. package/ToggleButton/index.js +200 -14
  121. package/Tooltip/index.d.ts +12 -10
  122. package/Tooltip/index.js +335 -15
  123. package/Transfer/index.d.ts +8 -3
  124. package/Transfer/index.js +343 -14
  125. package/Tree/index.d.ts +8 -5
  126. package/Tree/index.js +35 -14
  127. package/Upload/index.d.ts +179 -8
  128. package/Upload/index.js +1542 -14
  129. package/_verture/defineProperty-0590dc61.js +16 -0
  130. package/_verture/index-0d8e1d07.js +4 -0
  131. package/_verture/index-14a47097.js +4 -0
  132. package/_verture/index-342379c6.js +391 -0
  133. package/_verture/index-458032d7.js +10 -0
  134. package/_verture/index-46bfb2f0.js +778 -0
  135. package/_verture/index-50401de7.js +4 -0
  136. package/_verture/index-5b08df83.js +4 -0
  137. package/_verture/index-6190b129.js +4 -0
  138. package/_verture/index-7ef1e3b6.js +1553 -0
  139. package/_verture/index-a369ca3f.js +4 -0
  140. package/_verture/index-c60911dc.js +39 -0
  141. package/_verture/index-e2881a53.js +16 -0
  142. package/_verture/index-ff4c2a27.js +200 -0
  143. package/{Tree/interface.d.ts → _verture/interface-128abdd3.js} +15 -25
  144. package/_verture/interface-a77a851e.js +25 -0
  145. package/{Table/interface.d.ts → _verture/interface-a9b7c716.js} +20 -28
  146. package/_verture/intl-336570e4.js +65 -0
  147. package/_verture/modalContext-25890584.js +228 -0
  148. package/_verture/modalContext-639f2787.js +58 -0
  149. package/_verture/slicedToArray-d7722f4b.js +62 -0
  150. package/_verture/style-inject.es-300983ab.js +28 -0
  151. package/_verture/toConsumableArray-f8047a75.js +19 -0
  152. package/_verture/tslib.es6-55ed4bd2.js +38 -0
  153. package/_verture/typeof-498dd2b1.js +11 -0
  154. package/_verture/useFormatMessage-ac9d6acf.js +20 -0
  155. package/_verture/useGlobalProps-af9a2af6.js +12 -0
  156. package/index.d.ts +88 -128
  157. package/index.js +160 -19
  158. package/package.json +59 -22
  159. package/Button/SplitButton.d.ts +0 -61
  160. package/Button/lang/en_US.d.ts +0 -4
  161. package/Button/lang/index.d.ts +0 -9
  162. package/Button/lang/zh_CN.d.ts +0 -4
  163. package/Cascader/lang/en_US.d.ts +0 -4
  164. package/Cascader/lang/index.d.ts +0 -9
  165. package/Cascader/lang/zh_CN.d.ts +0 -4
  166. package/Collapse/collapsePanel.d.ts +0 -30
  167. package/Collapse/motion.d.ts +0 -5
  168. package/Collapse/util.d.ts +0 -11
  169. package/CollapseBox/util.d.ts +0 -5
  170. package/ComboSelect/WithTabsCombo/index.d.ts +0 -11
  171. package/ComboSelect/WithTabsCombo/interface.d.ts +0 -141
  172. package/ComboSelect/interface.d.ts +0 -143
  173. package/ComboSelect/lang/en_US.d.ts +0 -8
  174. package/ComboSelect/lang/index.d.ts +0 -17
  175. package/ComboSelect/lang/zh_CN.d.ts +0 -8
  176. package/ComboSelect/utils.d.ts +0 -12
  177. package/DatePicker/PickerButton.d.ts +0 -3
  178. package/DatePicker/PickerTag.d.ts +0 -3
  179. package/DatePicker/generatePicker/generateRangePicker.d.ts +0 -4
  180. package/DatePicker/generatePicker/generateSinglePicker.d.ts +0 -11
  181. package/DatePicker/generatePicker/index.d.ts +0 -77
  182. package/DatePicker/lang/en_US.d.ts +0 -3
  183. package/DatePicker/lang/index.d.ts +0 -7
  184. package/DatePicker/lang/zh_CN.d.ts +0 -3
  185. package/DatePicker/util.d.ts +0 -20
  186. package/Drawer/interface.d.ts +0 -83
  187. package/Drawer/lang/en_US.d.ts +0 -5
  188. package/Drawer/lang/index.d.ts +0 -11
  189. package/Drawer/lang/zh_CN.d.ts +0 -5
  190. package/Empty/images/index.d.ts +0 -2
  191. package/Empty/lang/en_US.d.ts +0 -6
  192. package/Empty/lang/index.d.ts +0 -13
  193. package/Empty/lang/zh_CN.d.ts +0 -6
  194. package/FormItem/compoments/defaultCompoments/index.d.ts +0 -19
  195. package/FormItem/compoments/formCheckboxGroup/index.d.ts +0 -8
  196. package/FormItem/compoments/formFile/index.d.ts +0 -38
  197. package/FormItem/compoments/formRadioGroup/index.d.ts +0 -8
  198. package/FormItem/compoments/formSelect/index.d.ts +0 -18
  199. package/FormItem/errorTips.d.ts +0 -12
  200. package/FormItem/itemType.d.ts +0 -42
  201. package/FormItem/validateFunction.d.ts +0 -15
  202. package/FunctionModal/dialog.d.ts +0 -58
  203. package/FunctionModal/modalContext.d.ts +0 -14
  204. package/GlobalContext/componentsProps.d.ts +0 -19
  205. package/GlobalContext/confirmLocale.d.ts +0 -7
  206. package/GlobalContext/intl.d.ts +0 -34
  207. package/GlobalContext/useFormatMessage.d.ts +0 -3
  208. package/Hooks/useGlobalProps.d.ts +0 -1
  209. package/Menu/footerExpansion.d.ts +0 -9
  210. package/Menu/interface.d.ts +0 -139
  211. package/Menu/logo.d.ts +0 -9
  212. package/Menu/verticalMenuList.d.ts +0 -14
  213. package/Modal/Confirm/index.d.ts +0 -66
  214. package/Modal/lang/en_US.d.ts +0 -5
  215. package/Modal/lang/index.d.ts +0 -11
  216. package/Modal/lang/zh_CN.d.ts +0 -5
  217. package/OperateBtn/lang/en_US.d.ts +0 -4
  218. package/OperateBtn/lang/index.d.ts +0 -9
  219. package/OperateBtn/lang/zh_CN.d.ts +0 -4
  220. package/PageHeader/horizontalMeun.d.ts +0 -9
  221. package/PageHeader/horizontalMeunRight.d.ts +0 -9
  222. package/PageHeader/interface.d.ts +0 -167
  223. package/Pagination/lang/en_US.d.ts +0 -8
  224. package/Pagination/lang/index.d.ts +0 -17
  225. package/Pagination/lang/zh_CN.d.ts +0 -8
  226. package/PopConfirm/lang/en_US.d.ts +0 -5
  227. package/PopConfirm/lang/index.d.ts +0 -11
  228. package/PopConfirm/lang/zh_CN.d.ts +0 -5
  229. package/Popper/index.d.ts +0 -13
  230. package/Popper/index.js +0 -16
  231. package/Progress/Line.d.ts +0 -47
  232. package/Progress/Steps.d.ts +0 -17
  233. package/Progress/utils.d.ts +0 -6
  234. package/Querying/images/index.d.ts +0 -2
  235. package/Querying/lang/en_US.d.ts +0 -4
  236. package/Querying/lang/index.d.ts +0 -9
  237. package/Querying/lang/zh_CN.d.ts +0 -4
  238. package/README.md +0 -489
  239. package/Select/lang/en_US.d.ts +0 -5
  240. package/Select/lang/index.d.ts +0 -11
  241. package/Select/lang/zh_CN.d.ts +0 -5
  242. package/Slider/interface.d.ts +0 -102
  243. package/Stepper/icons.d.ts +0 -5
  244. package/Table/lang/en_US.d.ts +0 -6
  245. package/Table/lang/index.d.ts +0 -13
  246. package/Table/lang/zh_CN.d.ts +0 -6
  247. package/Table/tableBody.d.ts +0 -9
  248. package/Table/tableBodyElement/index.d.ts +0 -15
  249. package/Table/tableBodyInterface.d.ts +0 -67
  250. package/Table/tableContainer/index.d.ts +0 -16
  251. package/Table/tableElement/index.d.ts +0 -17
  252. package/Table/tableHead.d.ts +0 -9
  253. package/Table/tableHeadElement/index.d.ts +0 -15
  254. package/Table/tableHeadInterface.d.ts +0 -30
  255. package/Table/tablePagination.d.ts +0 -9
  256. package/Table/tablePaginationInterFace.d.ts +0 -24
  257. package/Table/tdElement/index.d.ts +0 -15
  258. package/Table/thElement/index.d.ts +0 -15
  259. package/Table/trElement/index.d.ts +0 -15
  260. package/Table/util.d.ts +0 -16
  261. package/Tag/TagGroup.d.ts +0 -66
  262. package/TimePicker/locale/en_US.d.ts +0 -3
  263. package/TimePicker/locale/zh_CN.d.ts +0 -3
  264. package/TimePicker/style/index.d.ts +0 -1
  265. package/ToggleButton/ToggleButtonGroup.d.ts +0 -49
  266. package/Transfer/lang/en_US.d.ts +0 -6
  267. package/Transfer/lang/index.d.ts +0 -13
  268. package/Transfer/lang/zh_CN.d.ts +0 -6
  269. package/Tree/OperateBar/index.d.ts +0 -13
  270. package/Tree/Tree.d.ts +0 -4
  271. package/Tree/lang/en_US.d.ts +0 -8
  272. package/Tree/lang/index.d.ts +0 -17
  273. package/Tree/lang/zh_CN.d.ts +0 -8
  274. package/Tree/utils/closestPolyfill.d.ts +0 -0
  275. package/Tree/utils/tools.d.ts +0 -26
  276. package/Tree/utils/treeUtil.d.ts +0 -15
  277. package/Upload/Dragger/index.d.ts +0 -10
  278. package/Upload/ErroTip/index.d.ts +0 -13
  279. package/Upload/ImageUpload/index.d.ts +0 -14
  280. package/Upload/ImgCrop/EasyCrop.d.ts +0 -17
  281. package/Upload/ImgCrop/constants.d.ts +0 -7
  282. package/Upload/ImgCrop/index.d.ts +0 -6
  283. package/Upload/ImgCrop/interface.d.ts +0 -24
  284. package/Upload/UploadList/index.d.ts +0 -5
  285. package/Upload/interface.d.ts +0 -134
  286. package/Upload/lang/en_US.d.ts +0 -12
  287. package/Upload/lang/index.d.ts +0 -25
  288. package/Upload/lang/zh_CN.d.ts +0 -12
  289. package/cdn/AutoBox/index.js +0 -29
  290. package/cdn/AutoTips/index.js +0 -40
  291. package/cdn/Breadcrumbs/index.js +0 -53
  292. package/cdn/Button/index.js +0 -79
  293. package/cdn/ButtonGroup/index.js +0 -79
  294. package/cdn/Carousel/index.js +0 -6
  295. package/cdn/Cascader/index.js +0 -42
  296. package/cdn/Checkbox/index.js +0 -53
  297. package/cdn/CheckboxGroup/index.js +0 -53
  298. package/cdn/Collapse/index.js +0 -27
  299. package/cdn/CollapseBox/index.js +0 -1
  300. package/cdn/ColorPicker/index.js +0 -1
  301. package/cdn/ComboSelect/index.js +0 -438
  302. package/cdn/Container/index.js +0 -1
  303. package/cdn/DatePicker/index.js +0 -185
  304. package/cdn/Desktop/index.js +0 -24
  305. package/cdn/Drawer/index.js +0 -84
  306. package/cdn/Empty/index.js +0 -1
  307. package/cdn/Form/index.js +0 -477
  308. package/cdn/FormItem/index.js +0 -477
  309. package/cdn/FunctionModal/index.js +0 -144
  310. package/cdn/GlobalContext/index.js +0 -1
  311. package/cdn/Help/index.js +0 -53
  312. package/cdn/HelperText/index.js +0 -1
  313. package/cdn/InputLang/index.js +0 -144
  314. package/cdn/InputNumber/index.js +0 -118
  315. package/cdn/Label/index.js +0 -53
  316. package/cdn/Loading/index.js +0 -14
  317. package/cdn/Menu/index.js +0 -40
  318. package/cdn/Message/index.js +0 -53
  319. package/cdn/Modal/index.js +0 -144
  320. package/cdn/MultiBox/index.js +0 -131
  321. package/cdn/Notification/index.js +0 -66
  322. package/cdn/OperateBtn/index.js +0 -92
  323. package/cdn/PageHeader/index.js +0 -92
  324. package/cdn/Pagination/index.js +0 -214
  325. package/cdn/ParauiProvider/index.js +0 -9
  326. package/cdn/PopConfirm/index.js +0 -131
  327. package/cdn/Popover/index.js +0 -16
  328. package/cdn/Popper/index.js +0 -26
  329. package/cdn/Progress/index.js +0 -58
  330. package/cdn/Querying/index.js +0 -1
  331. package/cdn/Radio/index.js +0 -53
  332. package/cdn/RadioGroup/index.js +0 -53
  333. package/cdn/Search/index.js +0 -144
  334. package/cdn/Select/index.js +0 -131
  335. package/cdn/SelectInput/index.js +0 -131
  336. package/cdn/SingleBox/index.js +0 -131
  337. package/cdn/Slider/index.js +0 -16
  338. package/cdn/Split/index.js +0 -1
  339. package/cdn/Stepper/index.js +0 -154
  340. package/cdn/Switch/index.js +0 -71
  341. package/cdn/Table/index.js +0 -292
  342. package/cdn/Tabs/index.js +0 -165
  343. package/cdn/Tag/index.js +0 -27
  344. package/cdn/Test/index.js +0 -1
  345. package/cdn/TextField/index.js +0 -105
  346. package/cdn/TimePicker/index.js +0 -185
  347. package/cdn/Timeline/index.js +0 -16
  348. package/cdn/ToggleButton/index.js +0 -79
  349. package/cdn/Tooltip/index.js +0 -40
  350. package/cdn/Transfer/index.js +0 -170
  351. package/cdn/Tree/index.js +0 -170
  352. package/cdn/Upload/index.js +0 -252
  353. package/style.css +0 -72
@@ -1,15 +1,266 @@
1
- !function(i,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("rc-notification"),require("@para-ui/icons/WarningCircleF"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("clsx")):"function"==typeof define&&define.amd?define(["react","rc-notification","@para-ui/icons/WarningCircleF","@para-ui/icons/CheckCircleF","@para-ui/icons/Close","@para-ui/icons/CloseCircleF","clsx"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("rc-notification"),require("@para-ui/icons/WarningCircleF"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("clsx")):i.ParaUI=t(i.react,i["rc-notification"],i["@para-ui/icons/WarningCircleF"],i["@para-ui/icons/CheckCircleF"],i["@para-ui/icons/Close"],i["@para-ui/icons/CloseCircleF"],i.clsx)}(self,(function(i,t,n,o,e,a,r){return function(){var c={698:function(i,t,n){(t=n(3645)(!1)).push([i.id,'.paraui-notification{position:fixed;margin:0 24px 0 0;padding:0;color:#2e3743;font-size:14px;z-index:9999}.paraui-notification-topLeft,.paraui-notification-bottomLeft{margin-right:0;margin-left:24px}.paraui-notification-topLeft .paraui-notification-fade-enter.paraui-notification-fade-enter-active,.paraui-notification-bottomLeft .paraui-notification-fade-enter.paraui-notification-fade-enter-active,.paraui-notification-topLeft .paraui-notification-fade-appear.paraui-notification-fade-appear-active,.paraui-notification-bottomLeft .paraui-notification-fade-appear.paraui-notification-fade-appear-active{animation-name:NotificationLeftFadeIn}.paraui-notification-hook-holder,.paraui-notification-notice{position:relative;width:430px;max-width:calc(100vw - 48px);margin-bottom:16px;margin-left:auto;overflow:hidden;word-wrap:break-word;background:#fff;border-radius:4px;box-shadow:0px 2px 8px 0px rgba(171,176,185,.4)}.paraui-notification-topLeft .paraui-notification-hook-holder,.paraui-notification-topLeft .paraui-notification-notice,.paraui-notification-bottomLeft .paraui-notification-hook-holder,.paraui-notification-bottomLeft .paraui-notification-notice{margin-right:auto;margin-left:0}.paraui-notification-hook-holder>.paraui-notification-notice{margin-bottom:0;box-shadow:none}.paraui-notification-notice{padding:20px;line-height:1.5715}.paraui-notification-notice-content{position:relative}.paraui-notification-notice-message{margin-bottom:8px;color:#2e3743;font-size:14px;font-weight:700;line-height:24px}.paraui-notification-notice-message-single-line-auto-margin{display:block;width:calc(264px - 100%);max-width:4px;background-color:rgba(0,0,0,0);pointer-events:none}.paraui-notification-notice-message-single-line-auto-margin::before{display:block;content:""}.paraui-notification-notice-description{font-size:14px;font-weight:400}.paraui-notification-notice-closable .paraui-notification-notice-message{padding-right:24px}.paraui-notification-notice-with-icon .paraui-notification-notice-message{margin-bottom:4px;margin-left:24px}.paraui-notification-notice-with-icon .paraui-notification-notice-description{margin-left:24px}.paraui-notification .paraui-notification-notice-icon{position:absolute;top:4px;font-size:16px;line-height:24px}.paraui-notification .paraui-notification-notice-icon-success{color:#53c31b}.paraui-notification .paraui-notification-notice-icon-info{color:#3666d6}.paraui-notification .paraui-notification-notice-icon-warning{color:#ffa150}.paraui-notification .paraui-notification-notice-icon-error{color:#eb6054}.paraui-notification-notice-close{position:absolute;top:16px;right:22px;color:rgba(46,55,67,.7);outline:none}.paraui-notification-notice-close:hover{color:rgba(46,55,67,.7)}.paraui-notification .paraui-notification-close-icon{font-size:18px;cursor:pointer;color:rgba(46,55,67,.7)}.paraui-notification-notice-btn{float:right;margin-top:16px}.paraui-notification .notification-fade-effect{animation-duration:.24s;animation-timing-function:cubic-bezier(0.645, 0.045, 0.355, 1);animation-fill-mode:both}.paraui-notification-fade-enter,.paraui-notification-fade-appear{animation-duration:.24s;animation-timing-function:cubic-bezier(0.645, 0.045, 0.355, 1);animation-fill-mode:both;opacity:0;animation-play-state:paused}.paraui-notification-fade-leave{animation-duration:.24s;animation-timing-function:cubic-bezier(0.645, 0.045, 0.355, 1);animation-fill-mode:both;animation-play-state:paused}.paraui-notification-fade-enter.paraui-notification-fade-enter-active,.paraui-notification-fade-appear.paraui-notification-fade-appear-active{animation-name:NotificationFadeIn;animation-play-state:running}.paraui-notification-fade-leave.paraui-notification-fade-leave-active{animation-name:NotificationFadeOut;animation-play-state:running}@keyframes NotificationFadeIn{0%{left:430px;opacity:0}100%{left:0;opacity:1}}@keyframes NotificationLeftFadeIn{0%{right:430px;opacity:0}100%{right:0;opacity:1}}@keyframes NotificationFadeOut{0%{max-height:150px;margin-bottom:16px;opacity:1}100%{max-height:0;margin-bottom:0;padding-top:0;padding-bottom:0;opacity:0}}',""]),i.exports=t},3645:function(i){"use strict";i.exports=function(i){var t=[];return t.toString=function(){return this.map((function(t){var n=function(i,t){var n=i[1]||"",o=i[3];if(!o)return n;if(t&&"function"==typeof btoa){var e=(r=o,c=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(s," */")),a=o.sources.map((function(i){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(i," */")}));return[n].concat(a).concat([e]).join("\n")}var r,c,s;return[n].join("\n")}(t,i);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(i,n,o){"string"==typeof i&&(i=[[null,i,""]]);var e={};if(o)for(var a=0;a<this.length;a++){var r=this[a][0];null!=r&&(e[r]=!0)}for(var c=0;c<i.length;c++){var s=[].concat(i[c]);o&&e[s[0]]||(n&&(s[2]?s[2]="".concat(n," and ").concat(s[2]):s[2]=n),t.push(s))}},t}},7418:function(i){"use strict";
2
- /*
3
- object-assign
4
- (c) Sindre Sorhus
5
- @license MIT
6
- */var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function e(i){if(null==i)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}i.exports=function(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de","5"===Object.getOwnPropertyNames(i)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(i){return t[i]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(i){o[i]=i})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}()?Object.assign:function(i,a){for(var r,c,s=e(i),u=1;u<arguments.length;u++){for(var f in r=Object(arguments[u]))n.call(r,f)&&(s[f]=r[f]);if(t){c=t(r);for(var p=0;p<c.length;p++)o.call(r,c[p])&&(s[c[p]]=r[c[p]])}}return s}},5251:function(i,t,n){"use strict";
7
- /** @license React v17.0.2
8
- * react-jsx-runtime.production.min.js
9
- *
10
- * Copyright (c) Facebook, Inc. and its affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- */
15
- n(7418);var o=n(8156),e=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;e=a("react.element"),a("react.fragment")}var r=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function u(i,t,n){var o,a={},u=null,f=null;for(o in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(f=t.ref),t)c.call(t,o)&&!s.hasOwnProperty(o)&&(a[o]=t[o]);if(i&&i.defaultProps)for(o in t=i.defaultProps)void 0===a[o]&&(a[o]=t[o]);return{$$typeof:e,type:i,key:u,ref:f,props:a,_owner:r.current}}t.jsx=u,t.jsxs=u},5893:function(i,t,n){"use strict";i.exports=n(5251)},5567:function(i,t,n){var o=n(3379),e=n(698);"string"==typeof(e=e.__esModule?e.default:e)&&(e=[[i.id,e,""]]);var a={insert:("body","body"),singleton:!1};o(e,a);i.exports=e.locals||{}},3379:function(i,t,n){"use strict";var o,e=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},a=function(){var i={};return function(t){if(void 0===i[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(i){n=null}i[t]=n}return i[t]}}(),r=[];function c(i){for(var t=-1,n=0;n<r.length;n++)if(r[n].identifier===i){t=n;break}return t}function s(i,t){for(var n={},o=[],e=0;e<i.length;e++){var a=i[e],s=t.base?a[0]+t.base:a[0],u=n[s]||0,f="".concat(s," ").concat(u);n[s]=u+1;var p=c(f),l={css:a[1],media:a[2],sourceMap:a[3]};-1!==p?(r[p].references++,r[p].updater(l)):r.push({identifier:f,updater:b(l,t),references:1}),o.push(f)}return o}function u(i){var t=document.createElement("style"),o=i.attributes||{};if(void 0===o.nonce){var e=n.nc;e&&(o.nonce=e)}if(Object.keys(o).forEach((function(i){t.setAttribute(i,o[i])})),"function"==typeof i.insert)i.insert(t);else{var r=a(i.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}return t}var f,p=(f=[],function(i,t){return f[i]=t,f.filter(Boolean).join("\n")});function l(i,t,n,o){var e=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(i.styleSheet)i.styleSheet.cssText=p(t,e);else{var a=document.createTextNode(e),r=i.childNodes;r[t]&&i.removeChild(r[t]),r.length?i.insertBefore(a,r[t]):i.appendChild(a)}}function d(i,t,n){var o=n.css,e=n.media,a=n.sourceMap;if(e?i.setAttribute("media",e):i.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),i.styleSheet)i.styleSheet.cssText=o;else{for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(document.createTextNode(o))}}var m=null,g=0;function b(i,t){var n,o,e;if(t.singleton){var a=g++;n=m||(m=u(t)),o=l.bind(null,n,a,!1),e=l.bind(null,n,a,!0)}else n=u(t),o=d.bind(null,n,t),e=function(){!function(i){if(null===i.parentNode)return!1;i.parentNode.removeChild(i)}(n)};return o(i),function(t){if(t){if(t.css===i.css&&t.media===i.media&&t.sourceMap===i.sourceMap)return;o(i=t)}else e()}}i.exports=function(i,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=e());var n=s(i=i||[],t);return function(i){if(i=i||[],"[object Array]"===Object.prototype.toString.call(i)){for(var o=0;o<n.length;o++){var e=c(n[o]);r[e].references--}for(var a=s(i,t),u=0;u<n.length;u++){var f=c(n[u]);0===r[f].references&&(r[f].updater(),r.splice(f,1))}n=a}}}},1014:function(i){"use strict";i.exports=o},5927:function(i){"use strict";i.exports=e},6649:function(i){"use strict";i.exports=a},595:function(i){"use strict";i.exports=n},5744:function(i){"use strict";i.exports=r},6293:function(i){"use strict";i.exports=t},8156:function(t){"use strict";t.exports=i}},s={};function u(i){var t=s[i];if(void 0!==t)return t.exports;var n=s[i]={id:i,exports:{}};return c[i](n,n.exports,u),n.exports}u.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return u.d(t,{a:t}),t},u.d=function(i,t){for(var n in t)u.o(t,n)&&!u.o(i,n)&&Object.defineProperty(i,n,{enumerable:!0,get:t[n]})},u.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},u.r=function(i){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},u.nc=void 0;var f={};return function(){"use strict";u.r(f);var i,t,n,o=u(5893),e=u(8156),a=u.n(e),r=u(6293),c=u.n(r),s=u(595),p=u.n(s),l=u(1014),d=u.n(l),m=u(5927),g=u.n(m),b=u(6649),v=u.n(b),h=u(5744),y=u.n(h),x=(u(5567),function(){return x=Object.assign||function(i){for(var t,n=1,o=arguments.length;n<o;n++)for(var e in t=arguments[n])Object.prototype.hasOwnProperty.call(t,e)&&(i[e]=t[e]);return i},x.apply(this,arguments)}),C={},w=4.5,j=24,O=24,k="topRight";function N(i,t,n){var o;switch(void 0===t&&(t=j),void 0===n&&(n=O),i){case"topLeft":o={left:0,top:t,bottom:"auto"};break;case"topRight":o={right:0,top:t,bottom:"auto"};break;case"bottomLeft":o={left:0,top:"auto",bottom:n};break;default:o={right:0,top:"auto",bottom:n}}return o}var S={success:d(),info:p(),error:v(),warning:p()};var _={open:function(e){!function(e,a){var r,s=e.placement,u=void 0===s?k:s,f=e.top,p=e.bottom,l=e.getContainer,d=void 0===l?i:l,m=e.closeIcon,b=void 0===m?t:m,v="paraui-notification",h="".concat(v,"-").concat(u),w=C[h];if(w)Promise.resolve(w).then((function(i){a({prefixCls:"".concat(v,"-notice"),instance:i})}));else{var j=(0,o.jsx)("span",x({className:"".concat(v,"-close-x")},{children:b||(0,o.jsx)(g(),{className:"".concat(v,"-close-icon")})})),O=y()("".concat(v,"-").concat(u),((r={})["".concat(v,"-rtl")]=!1,r));C[h]=new Promise((function(i){c().newInstance({prefixCls:v,className:O,style:N(u,f,p),getContainer:d,closeIcon:j,maxCount:n},(function(t){i(t),a({prefixCls:"".concat(v,"-notice"),instance:t})}))}))}}(e,(function(i){var t=i.prefixCls;i.instance.notice(function(i,t){var n,e=i.duration,r=i.icon,c=i.type,s=i.description,u=i.message,f=i.btn,p=i.onClose,l=i.onClick,d=i.key,m=i.style,g=i.className,b=void 0===e?w:e,v=null;r?v=(0,o.jsx)("span",x({className:"".concat(t,"-icon")},{children:r})):c&&(v=a().createElement(S[c]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(c)}));var h=!s&&v?(0,o.jsx)("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:(0,o.jsxs)("div",x({className:v?"".concat(t,"-with-icon"):""},{children:[v,(0,o.jsxs)("div",x({className:"".concat(t,"-message")},{children:[h,u]})),(0,o.jsx)("div",x({className:"".concat(t,"-description")},{children:s})),f?(0,o.jsx)("span",x({className:"".concat(t,"-btn")},{children:f})):null]})),duration:b,closable:!0,onClose:p,onClick:l,key:d,style:m||{},className:y()(g,(n={},n["".concat(t,"-").concat(c)]=!!c,n))}}(e,t))}))},close:function(i){Object.keys(C).forEach((function(t){return Promise.resolve(C[t]).then((function(t){t.removeNotice(i)}))}))},config:function(o){var e=o.duration,a=o.placement,r=o.bottom,c=o.top,s=o.getContainer,u=o.closeIcon;void 0!==e&&(w=e),void 0!==a&&(k=a),void 0!==r&&(O=r),void 0!==c&&(j=c),void 0!==s&&(i=s),void 0!==u&&(t=u),void 0!==o.maxCount&&(n=o.maxCount)},destroy:function(){Object.keys(C).forEach((function(i){Promise.resolve(C[i]).then((function(i){i.destroy()})),delete C[i]}))}};["success","info","warning","error"].forEach((function(i){_[i]=function(t){return _.open(x(x({},t),{type:i}))}})),_.warn=_.warning,f.default=_}(),f}()}));
1
+ import { _ as _defineProperty } from '../_verture/defineProperty-0590dc61.js';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import React__default from 'react';
4
+ import Notification from 'rc-notification';
5
+ import WarningCircleF from '@para-ui/icons/WarningCircleF';
6
+ import SuccessOutlined from '@para-ui/icons/CheckCircleF';
7
+ import CloseIcon from '@para-ui/icons/Close';
8
+ import ErrorOutlined from '@para-ui/icons/CloseCircleF';
9
+ import clsx from 'clsx';
10
+ import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
11
+
12
+ var css_248z = "@charset \"UTF-8\";\n/**\n * @author Hanz\n * @date 2022/1/13 上午10:30\n * @description 通知提醒框\n */\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-notification {\n position: fixed;\n margin: 0 24px 0 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n z-index: 9999;\n}\n.paraui-notification-topLeft, .paraui-notification-bottomLeft {\n margin-right: 0;\n margin-left: 24px;\n}\n.paraui-notification-topLeft .paraui-notification-fade-enter.paraui-notification-fade-enter-active, .paraui-notification-bottomLeft .paraui-notification-fade-enter.paraui-notification-fade-enter-active, .paraui-notification-topLeft .paraui-notification-fade-appear.paraui-notification-fade-appear-active, .paraui-notification-bottomLeft .paraui-notification-fade-appear.paraui-notification-fade-appear-active {\n animation-name: NotificationLeftFadeIn;\n}\n.paraui-notification-hook-holder, .paraui-notification-notice {\n position: relative;\n width: 430px;\n max-width: calc(100vw - 48px);\n margin-bottom: 16px;\n margin-left: auto;\n overflow: hidden;\n word-wrap: break-word;\n background: rgb(255, 255, 255);\n border-radius: 4px;\n box-shadow: 0px 2px 8px 0px rgba(171, 176, 185, 0.4);\n}\n.paraui-notification-topLeft .paraui-notification-hook-holder, .paraui-notification-topLeft .paraui-notification-notice, .paraui-notification-bottomLeft .paraui-notification-hook-holder, .paraui-notification-bottomLeft .paraui-notification-notice {\n margin-right: auto;\n margin-left: 0;\n}\n.paraui-notification-hook-holder > .paraui-notification-notice {\n margin-bottom: 0;\n box-shadow: none;\n}\n.paraui-notification-notice {\n padding: 20px;\n line-height: 1.5715;\n}\n.paraui-notification-notice-content {\n position: relative;\n}\n.paraui-notification-notice-message {\n margin-bottom: 8px;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-weight: 700;\n line-height: 24px;\n}\n.paraui-notification-notice-message-single-line-auto-margin {\n display: block;\n width: calc(264px - 100%);\n max-width: 4px;\n background-color: transparent;\n pointer-events: none;\n}\n.paraui-notification-notice-message-single-line-auto-margin::before {\n display: block;\n content: \"\";\n}\n.paraui-notification-notice-description {\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-notification-notice-closable .paraui-notification-notice-message {\n padding-right: 24px;\n}\n.paraui-notification-notice-with-icon .paraui-notification-notice-message {\n margin-bottom: 4px;\n margin-left: 24px;\n}\n.paraui-notification-notice-with-icon .paraui-notification-notice-description {\n margin-left: 24px;\n}\n.paraui-notification .paraui-notification-notice-icon {\n position: absolute;\n top: 4px;\n font-size: 16px;\n line-height: 24px;\n}\n.paraui-notification .paraui-notification-notice-icon-success {\n color: rgb(83, 195, 27);\n}\n.paraui-notification .paraui-notification-notice-icon-info {\n color: rgb(54, 102, 214);\n}\n.paraui-notification .paraui-notification-notice-icon-warning {\n color: rgb(255, 161, 80);\n}\n.paraui-notification .paraui-notification-notice-icon-error {\n color: rgb(235, 96, 84);\n}\n.paraui-notification-notice-close {\n position: absolute;\n top: 16px;\n right: 22px;\n color: rgba(46, 55, 67, 0.7);\n outline: none;\n}\n.paraui-notification-notice-close:hover {\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-notification .paraui-notification-close-icon {\n font-size: 18px;\n cursor: pointer;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-notification-notice-btn {\n float: right;\n margin-top: 16px;\n}\n.paraui-notification .notification-fade-effect {\n animation-duration: 0.24s;\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-fill-mode: both;\n}\n.paraui-notification-fade-enter, .paraui-notification-fade-appear {\n animation-duration: 0.24s;\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-fill-mode: both;\n opacity: 0;\n animation-play-state: paused;\n}\n.paraui-notification-fade-leave {\n animation-duration: 0.24s;\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n.paraui-notification-fade-enter.paraui-notification-fade-enter-active, .paraui-notification-fade-appear.paraui-notification-fade-appear-active {\n animation-name: NotificationFadeIn;\n animation-play-state: running;\n}\n.paraui-notification-fade-leave.paraui-notification-fade-leave-active {\n animation-name: NotificationFadeOut;\n animation-play-state: running;\n}\n@keyframes NotificationFadeIn {\n 0% {\n left: 430px;\n opacity: 0;\n }\n 100% {\n left: 0;\n opacity: 1;\n }\n}\n@keyframes NotificationLeftFadeIn {\n 0% {\n right: 430px;\n opacity: 0;\n }\n 100% {\n right: 0;\n opacity: 1;\n }\n}\n@keyframes NotificationFadeOut {\n 0% {\n max-height: 150px;\n margin-bottom: 16px;\n opacity: 1;\n }\n 100% {\n max-height: 0;\n margin-bottom: 0;\n padding-top: 0;\n padding-bottom: 0;\n opacity: 0;\n }\n}";
13
+ styleInject(css_248z);
14
+
15
+ var notificationInstance = {}; // 默认值
16
+
17
+ var defaultDuration = 4.5; //默认 4.5 秒后自动关闭,配置为 null 则不自动关闭
18
+
19
+ var defaultTop = 24;
20
+ var defaultBottom = 24;
21
+ var defaultPlacement = 'topRight';
22
+ var defaultGetContainer;
23
+ var defaultCloseIcon;
24
+ var rtl = false;
25
+ var maxCount; //设置全局配置
26
+
27
+ function setNotificationConfig(options) {
28
+ var duration = options.duration,
29
+ placement = options.placement,
30
+ bottom = options.bottom,
31
+ top = options.top,
32
+ getContainer = options.getContainer,
33
+ closeIcon = options.closeIcon;
34
+
35
+ if (duration !== undefined) {
36
+ defaultDuration = duration;
37
+ }
38
+
39
+ if (placement !== undefined) {
40
+ defaultPlacement = placement;
41
+ }
42
+
43
+ if (bottom !== undefined) {
44
+ defaultBottom = bottom;
45
+ }
46
+
47
+ if (top !== undefined) {
48
+ defaultTop = top;
49
+ }
50
+
51
+ if (getContainer !== undefined) {
52
+ defaultGetContainer = getContainer;
53
+ }
54
+
55
+ if (closeIcon !== undefined) {
56
+ defaultCloseIcon = closeIcon;
57
+ }
58
+
59
+ if (options.maxCount !== undefined) {
60
+ maxCount = options.maxCount;
61
+ }
62
+ } //获得位置样式
63
+
64
+
65
+ function getPlacementStyle(placement) {
66
+ var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop;
67
+ var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;
68
+ var style;
69
+
70
+ switch (placement) {
71
+ case 'topLeft':
72
+ style = {
73
+ left: 0,
74
+ top: top,
75
+ bottom: 'auto'
76
+ };
77
+ break;
78
+
79
+ case 'topRight':
80
+ style = {
81
+ right: 0,
82
+ top: top,
83
+ bottom: 'auto'
84
+ };
85
+ break;
86
+
87
+ case 'bottomLeft':
88
+ style = {
89
+ left: 0,
90
+ top: 'auto',
91
+ bottom: bottom
92
+ };
93
+ break;
94
+
95
+ default:
96
+ style = {
97
+ right: 0,
98
+ top: 'auto',
99
+ bottom: bottom
100
+ };
101
+ break;
102
+ }
103
+
104
+ return style;
105
+ } //创建通知框实例
106
+
107
+
108
+ function getNotificationInstance(args, callback) {
109
+ var _args$placement = args.placement,
110
+ placement = _args$placement === void 0 ? defaultPlacement : _args$placement,
111
+ top = args.top,
112
+ bottom = args.bottom,
113
+ _args$getContainer = args.getContainer,
114
+ getContainer = _args$getContainer === void 0 ? defaultGetContainer : _args$getContainer,
115
+ _args$closeIcon = args.closeIcon,
116
+ closeIcon = _args$closeIcon === void 0 ? defaultCloseIcon : _args$closeIcon;
117
+ var prefixCls = 'paraui-notification';
118
+ var cacheKey = "".concat(prefixCls, "-").concat(placement);
119
+ var cacheInstance = notificationInstance[cacheKey];
120
+
121
+ if (cacheInstance) {
122
+ Promise.resolve(cacheInstance).then(function (instance) {
123
+ callback({
124
+ prefixCls: "".concat(prefixCls, "-notice"),
125
+ instance: instance
126
+ });
127
+ });
128
+ return;
129
+ } //close icon
130
+
131
+
132
+ var closeIconToRender = jsx("span", Object.assign({
133
+ className: "".concat(prefixCls, "-close-x")
134
+ }, {
135
+ children: closeIcon || jsx(CloseIcon, {
136
+ className: "".concat(prefixCls, "-close-icon")
137
+ })
138
+ })); //通知框cls
139
+
140
+
141
+ var notificationCls = clsx("".concat(prefixCls, "-").concat(placement), _defineProperty({}, "".concat(prefixCls, "-rtl"), rtl === true));
142
+ notificationInstance[cacheKey] = new Promise(function (resolve) {
143
+ Notification.newInstance({
144
+ prefixCls: prefixCls,
145
+ className: notificationCls,
146
+ style: getPlacementStyle(placement, top, bottom),
147
+ getContainer: getContainer,
148
+ closeIcon: closeIconToRender,
149
+ maxCount: maxCount
150
+ }, function (notification) {
151
+ resolve(notification);
152
+ callback({
153
+ prefixCls: "".concat(prefixCls, "-notice"),
154
+ instance: notification
155
+ });
156
+ });
157
+ });
158
+ } //通知框类型图标
159
+
160
+
161
+ var typeToIcon = {
162
+ success: SuccessOutlined,
163
+ info: WarningCircleF,
164
+ error: ErrorOutlined,
165
+ warning: WarningCircleF
166
+ }; //创建通知框内容配置
167
+
168
+ function getNoticeProps(args, prefixCls) {
169
+ var durationArg = args.duration,
170
+ icon = args.icon,
171
+ type = args.type,
172
+ description = args.description,
173
+ message = args.message,
174
+ btn = args.btn,
175
+ onClose = args.onClose,
176
+ onClick = args.onClick,
177
+ key = args.key,
178
+ style = args.style,
179
+ className = args.className;
180
+ var duration = durationArg === undefined ? defaultDuration : durationArg;
181
+ var iconNode = null;
182
+
183
+ if (icon) {
184
+ iconNode = jsx("span", Object.assign({
185
+ className: "".concat(prefixCls, "-icon")
186
+ }, {
187
+ children: icon
188
+ }));
189
+ } else if (type) {
190
+ iconNode = /*#__PURE__*/React__default.createElement(typeToIcon[type] || null, {
191
+ className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(type)
192
+ });
193
+ }
194
+
195
+ var autoMarginTag = !description && iconNode ? jsx("span", {
196
+ className: "".concat(prefixCls, "-message-single-line-auto-margin")
197
+ }) : null;
198
+ return {
199
+ content: jsxs("div", Object.assign({
200
+ className: iconNode ? "".concat(prefixCls, "-with-icon") : ''
201
+ }, {
202
+ children: [iconNode, jsxs("div", Object.assign({
203
+ className: "".concat(prefixCls, "-message")
204
+ }, {
205
+ children: [autoMarginTag, message]
206
+ })), jsx("div", Object.assign({
207
+ className: "".concat(prefixCls, "-description")
208
+ }, {
209
+ children: description
210
+ })), btn ? jsx("span", Object.assign({
211
+ className: "".concat(prefixCls, "-btn")
212
+ }, {
213
+ children: btn
214
+ })) : null]
215
+ })),
216
+ duration: duration,
217
+ closable: true,
218
+ onClose: onClose,
219
+ onClick: onClick,
220
+ key: key,
221
+ style: style || {},
222
+ className: clsx(className, _defineProperty({}, "".concat(prefixCls, "-").concat(type), !!type))
223
+ };
224
+ } //通知框调用方法
225
+
226
+
227
+ function notice(args) {
228
+ getNotificationInstance(args, function (_ref) {
229
+ var prefixCls = _ref.prefixCls,
230
+ instance = _ref.instance;
231
+ instance.notice(getNoticeProps(args, prefixCls));
232
+ });
233
+ } //通知框api method
234
+
235
+
236
+ var api = {
237
+ open: notice,
238
+ close: function close(key) {
239
+ Object.keys(notificationInstance).forEach(function (cacheKey) {
240
+ return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
241
+ instance.removeNotice(key);
242
+ });
243
+ });
244
+ },
245
+ config: setNotificationConfig,
246
+ destroy: function destroy() {
247
+ Object.keys(notificationInstance).forEach(function (cacheKey) {
248
+ Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
249
+ instance.destroy();
250
+ });
251
+ delete notificationInstance[cacheKey];
252
+ });
253
+ }
254
+ }; //通知框预设类型 'success', 'info', 'warning', 'error'
255
+
256
+ ['success', 'info', 'warning', 'error'].forEach(function (type) {
257
+ api[type] = function (args) {
258
+ return api.open(Object.assign(Object.assign({}, args), {
259
+ type: type
260
+ }));
261
+ };
262
+ }); //兼容warn、warning
263
+
264
+ api.warn = api.warning;
265
+
266
+ export { api as default };
@@ -1,24 +1,29 @@
1
+ import React__default, { FunctionComponent } from 'react';
2
+ import styleInject from './node_modules/style-inject/dist/style-inject.es.js';
3
+
4
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2022/4/13 10:48 AM\n* @description 表格操作按钮\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-operate-btn {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n display: flex;\n align-items: center;\n}\n.paraui-operate-btn > .paraui-operate-btn-line {\n display: inline-block;\n width: 1px;\n background-color: rgba(54, 102, 214, 0.2);\n margin: 0 12px;\n}\n.paraui-operate-btn.paraui-operate-btn-small > .paraui-operate-btn-line {\n height: 12px;\n}\n.paraui-operate-btn.paraui-operate-btn-small button svg {\n font-size: 18px;\n}\n.paraui-operate-btn.paraui-operate-btn-medium > .paraui-operate-btn-line {\n height: 14px;\n}\n.paraui-operate-btn.paraui-operate-btn-medium button svg {\n font-size: 24px;\n}\n.paraui-operate-btn.paraui-operate-btn-large > .paraui-operate-btn-line {\n height: 16px;\n}\n.paraui-operate-btn.paraui-operate-btn-large button > svg {\n font-size: 28px;\n}\n\n.paraui-operate-btn-popover .paraui-operate-btn-list {\n padding: 8px 0;\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item {\n padding: 0 12px;\n max-width: 120px;\n cursor: pointer;\n color: rgb(46, 55, 67);\n line-height: 36px;\n text-align: left;\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item-disabled {\n cursor: not-allowed;\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item-danger {\n color: rgb(235, 96, 84);\n}";
5
+ styleInject(css_248z);
6
+
1
7
  /**
2
8
  * @author linhd
3
9
  * @date 2022/4/13 10:49 AM
4
10
  * @description 表格操作按钮
5
11
  */
6
- import React, { FunctionComponent } from 'react';
7
- import './index.scss';
12
+
8
13
  /** 按钮配置 */
9
- export interface OperateBtnListProps {
14
+ interface OperateBtnListProps {
10
15
  /** 样式class */
11
16
  className?: string;
12
17
  /** style */
13
- style?: React.CSSProperties;
18
+ style?: React__default.CSSProperties;
14
19
  /** key 表示唯一值 */
15
20
  key?: string;
16
21
  /** 显示名 */
17
- label?: React.ReactNode;
22
+ label?: React__default.ReactNode;
18
23
  /** 鼠标移上去显示的内容 */
19
- toolTipTitle?: React.ReactNode;
24
+ toolTipTitle?: React__default.ReactNode;
20
25
  /** 图标 */
21
- icon?: React.ReactNode;
26
+ icon?: React__default.ReactNode;
22
27
  /** 定位方向 */
23
28
  placement?: "top-start" | "bottom-end" | "bottom-start" | "bottom" | "left-end" | "left-start" | "left" | "right-end" | "right-start" | "right" | "top-end" | "top";
24
29
  /** 是否禁用 */
@@ -29,11 +34,11 @@ export interface OperateBtnListProps {
29
34
  onClick?: (item: OperateBtnListProps, e: any) => void | Promise<boolean | any>;
30
35
  [name: string]: any;
31
36
  }
32
- export interface OperateBtnProps {
37
+ interface OperateBtnProps {
33
38
  /** 样式class */
34
39
  className?: string;
35
40
  /** style */
36
- style?: React.CSSProperties;
41
+ style?: React__default.CSSProperties;
37
42
  /** listItem索引下标 */
38
43
  key?: string;
39
44
  /** 大小 */
@@ -56,4 +61,5 @@ export interface OperateBtnProps {
56
61
  onClick?: (item: OperateBtnListProps, e: any) => void | Promise<boolean | any>;
57
62
  }
58
63
  declare const OperateBtn: FunctionComponent<OperateBtnProps>;
59
- export default OperateBtn;
64
+
65
+ export { OperateBtnListProps, OperateBtnProps, OperateBtn as default };