@unicom-cloud/ui 0.8.109 → 0.8.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/Affix.js +2 -2
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +1 -1
  4. package/BackTop.js +2 -2
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +1 -1
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/ColorPicker.js +1 -1
  14. package/Comment.js +1 -1
  15. package/ConfigProvider.js +1 -1
  16. package/Copy.js +6 -4
  17. package/Countdown.js +42 -8
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +1 -1
  20. package/Details.js +42 -6
  21. package/Development.js +1 -1
  22. package/Divider.js +1 -1
  23. package/Draggable.js +1 -1
  24. package/Dropdown.js +1 -1
  25. package/Empty.js +1 -1
  26. package/Flex.js +43 -7
  27. package/Form.js +21 -16
  28. package/Icon.js +1 -1
  29. package/IconHover.js +1 -1
  30. package/Image.js +1 -1
  31. package/InputNumber.js +1 -1
  32. package/Layout.js +1 -1
  33. package/Link.js +2 -2
  34. package/LiquidFill.js +12 -10
  35. package/List.js +1 -1
  36. package/Loading.js +42 -6
  37. package/Marquee.js +12 -10
  38. package/Mentions.js +1 -1
  39. package/Menu.js +1 -1
  40. package/Message.js +3 -3
  41. package/Modal.js +1 -1
  42. package/Notice.js +41 -5
  43. package/Notification.js +1 -1
  44. package/OverflowEllipsis.js +1 -1
  45. package/PageHeader.js +2 -2
  46. package/Popconfirm.js +1 -1
  47. package/Popover.js +1 -1
  48. package/Progress.js +1 -1
  49. package/QrCode.js +12 -10
  50. package/Radio.js +1 -1
  51. package/Rate.js +1 -1
  52. package/ResizeBox.js +1 -1
  53. package/Result.js +1 -1
  54. package/RichText.js +19 -0
  55. package/Segmented.js +42 -7
  56. package/Skeleton.js +1 -1
  57. package/Slider.js +1 -1
  58. package/Space.js +43 -7
  59. package/Spin.js +1 -1
  60. package/Statistic.js +1 -1
  61. package/Steps.js +1 -1
  62. package/Switch.js +1 -1
  63. package/Table.js +1 -1
  64. package/Tabs.js +1 -1
  65. package/Tag.js +2 -2
  66. package/Tooltip.js +1 -1
  67. package/Tour.js +13 -11
  68. package/Transfer.js +1 -1
  69. package/Tree.js +1 -1
  70. package/TreeSelect.js +1 -1
  71. package/Trigger.js +1 -1
  72. package/affix/index.js +2 -2
  73. package/alert/index.js +1 -1
  74. package/anchor/Anchor.js +2 -2
  75. package/anchor/Link.js +1 -1
  76. package/app/App.js +2 -2
  77. package/auto-complete/index.js +1 -1
  78. package/avatar/Avatar.js +1 -1
  79. package/avatar/Group.js +1 -1
  80. package/back-top/index.js +2 -2
  81. package/badge/index.js +1 -1
  82. package/breadcrumb/index.js +2 -2
  83. package/button/Group.js +1 -1
  84. package/button/index.js +1 -1
  85. package/calendar/index.js +3 -3
  86. package/card/Grid.js +1 -1
  87. package/card/Meta.js +1 -1
  88. package/card/index.js +1 -1
  89. package/carousel/Arrow.js +2 -2
  90. package/carousel/Indicator.js +1 -1
  91. package/carousel/index.js +1 -1
  92. package/cascader/Cascader.js +3 -3
  93. package/cascader/index.js +1 -1
  94. package/cascader/util.js +1 -1
  95. package/checkbox/Checkbox.js +2 -2
  96. package/checkbox/Group.js +2 -2
  97. package/checkbox/GroupBlock.js +2 -2
  98. package/checkbox/index.js +2 -2
  99. package/chunk/BDMqvmVH.js +4239 -0
  100. package/chunk/BDgzrqDN.js +154 -0
  101. package/chunk/BG6j6Ct7.js +30 -0
  102. package/chunk/BGJspFG9.js +56 -0
  103. package/chunk/BO_5qdS_.js +13 -0
  104. package/chunk/{DblEjsQ8.js → BUNoUPLs.js} +1 -1
  105. package/chunk/B_c0gPsX.js +83 -0
  106. package/chunk/BcEZk8pT.js +837 -0
  107. package/chunk/{DGSfSsAY.js → BeHcDey_.js} +1 -1
  108. package/chunk/{B9YvSTvI.js → BlflTd2i.js} +695 -856
  109. package/chunk/{Bm3gJPkz.js → BnUWOu3_.js} +5 -5
  110. package/chunk/Bvxzb1wd.js +16 -0
  111. package/chunk/{DryCfcSV.js → CFyN9Eio.js} +4 -4
  112. package/chunk/CN7NKv_2.js +11 -0
  113. package/chunk/{BDKb_-wj.js → COsRZOz1.js} +4 -4
  114. package/chunk/CT7ury1Z.js +13 -0
  115. package/chunk/Ca6eMq_Y.js +8 -0
  116. package/chunk/{p9jiLDTk.js → CgN4U7Ou.js} +2 -2
  117. package/chunk/{Bg3uJGPu.js → CsqGBZv1.js} +1 -1
  118. package/chunk/CylJZkp8.js +6 -0
  119. package/chunk/{9WWq1a0I.js → DSqW_efI.js} +1 -1
  120. package/chunk/{Bz3KT4sO.js → Dbw0YUY1.js} +81 -47
  121. package/chunk/Dh-zFF65.js +15 -0
  122. package/chunk/Di5KBCVQ.js +4 -0
  123. package/chunk/{DjPTURUf.js → Lyh0cz3R.js} +3 -3
  124. package/chunk/{DgWzb7M5.js → Y_GQsZUt.js} +1 -1
  125. package/chunk/{BfBHo0RR.js → n1tirBXA.js} +7 -7
  126. package/chunk/{DYc9a7tm.js → qsVvkBLU.js} +1 -1
  127. package/collapse/Collapse.js +2 -2
  128. package/collapse/Item.js +2 -2
  129. package/color-picker/ControlBar.js +1 -1
  130. package/color-picker/InputAlpha.js +1 -1
  131. package/color-picker/InputHex.js +1 -1
  132. package/color-picker/InputRgb.js +1 -1
  133. package/color-picker/Palette.js +1 -1
  134. package/color-picker/Panel.js +2 -2
  135. package/color-picker/index.js +1 -1
  136. package/comment/index.js +1 -1
  137. package/config-provider/ConfigProvider.js +1 -1
  138. package/config-provider/context.js +1 -1
  139. package/config-provider/index.js +2 -2
  140. package/copy/index.js +10 -8
  141. package/countdown/index.js +67 -33
  142. package/date-picker/Picker.js +1 -1
  143. package/date-picker/RangePicker.js +2 -2
  144. package/date-picker/index.js +1 -1
  145. package/descriptions/index.js +1 -1
  146. package/details/index.js +74 -38
  147. package/development/index.js +1 -1
  148. package/divider/index.js +1 -1
  149. package/draggable/index.js +1 -1
  150. package/drawer/Drawer.js +1 -1
  151. package/dropdown/Button.js +1 -1
  152. package/dropdown/index.js +1 -1
  153. package/empty/index.js +1 -1
  154. package/flex/index.js +63 -29
  155. package/form/Form.js +3 -3
  156. package/form/FormItem.js +1 -1
  157. package/form/index.js +85 -77
  158. package/grid/Grid.js +1 -1
  159. package/grid/Item.js +1 -1
  160. package/hooks/index.js +123 -129
  161. package/hooks/useCreation.js +4 -0
  162. package/hooks/useId.js +1 -1
  163. package/hooks/useIsomorphicLayoutEffect.js +1 -1
  164. package/hooks/useKeyboardEvent.js +1 -1
  165. package/hooks/useMedia.js +1 -1
  166. package/hooks/usePersistCallback.js +1 -1
  167. package/hooks/useRefs.js +1 -1
  168. package/hooks/useStateWithPromise.js +1 -1
  169. package/hooks/useWatch.js +1 -1
  170. package/hooks/useWindowSize.js +1 -1
  171. package/icon/index.js +1 -1
  172. package/icon-hover/index.js +1 -1
  173. package/icons/file.js +1 -1
  174. package/image/Image.js +3 -3
  175. package/image/ImagePreview.js +44 -9
  176. package/image/ImagePreviewArrow.js +1 -1
  177. package/image/ImagePreviewGroup.js +1 -1
  178. package/image/index.js +1 -1
  179. package/index.js +470 -470
  180. package/input/Button.js +1 -1
  181. package/input/Group.js +1 -1
  182. package/input/Input.js +3 -3
  183. package/input/InputElement.js +2 -2
  184. package/input/Password.js +2 -2
  185. package/input/Search.js +1 -1
  186. package/input/Textarea.js +2 -2
  187. package/input-number/index.js +1 -1
  188. package/input-number/useSelectionRange.js +1 -1
  189. package/input-tag/InputTag.js +1 -1
  190. package/layout/Content.js +1 -1
  191. package/layout/Footer.js +1 -1
  192. package/layout/Header.js +1 -1
  193. package/layout/Sider.js +1 -1
  194. package/layout/index.js +1 -1
  195. package/link/index.js +2 -2
  196. package/liquid-fill/index.js +17 -15
  197. package/list/Item.js +1 -1
  198. package/list/Meta.js +1 -1
  199. package/list/index.js +1 -1
  200. package/loading/index.js +54 -18
  201. package/marquee/index.js +19 -17
  202. package/marquee-/index.js +17 -15
  203. package/mentions/index.js +1 -1
  204. package/menu/Menu.js +4 -4
  205. package/menu/OverflowWrap.js +1 -1
  206. package/menu/index.js +2 -2
  207. package/message/index.js +3 -3
  208. package/message/useMessage.js +4 -3
  209. package/modal/Confirm.js +2 -2
  210. package/modal/Modal.js +2 -2
  211. package/modal/index.js +2 -2
  212. package/notice/index.js +41 -5
  213. package/notification/index.js +1 -1
  214. package/notification/useNotification.js +1 -1
  215. package/overflow-ellipsis/OverflowItem.js +1 -1
  216. package/overflow-ellipsis/index.js +1 -1
  217. package/package.json +1 -1
  218. package/page-header/index.js +120 -81
  219. package/pagination/PageItem.js +2 -2
  220. package/pagination/PageJumper.js +1 -1
  221. package/pagination/PageOption.js +1 -1
  222. package/pagination/Pagination.js +1 -1
  223. package/picker/Input.js +1 -1
  224. package/picker/InputRange.js +1 -1
  225. package/popconfirm/index.js +1 -1
  226. package/popover/index.js +1 -1
  227. package/progress/CircleProgress.js +2 -2
  228. package/progress/index.js +1 -1
  229. package/qr-code/index.js +15 -13
  230. package/radio/Group.js +2 -2
  231. package/radio/GroupBlock.js +2 -2
  232. package/radio/Radio.js +2 -2
  233. package/radio/index.js +2 -2
  234. package/rate/index.js +1 -1
  235. package/resize-box/ResizeTrigger.js +1 -1
  236. package/resize-box/Split.js +2 -2
  237. package/resize-box/SplitGroup.js +1 -1
  238. package/resize-box/index.js +1 -1
  239. package/result/index.js +1 -1
  240. package/rich-text/constant.js +5 -0
  241. package/rich-text/core.js +11 -0
  242. package/rich-text/index.js +119 -0
  243. package/rich-text/interface.js +1 -0
  244. package/rich-text/rich.js +1877 -0
  245. package/row-col/Col-.js +1 -1
  246. package/row-col/Col.js +1 -1
  247. package/row-col/Row.js +1 -1
  248. package/segmented/index.js +145 -110
  249. package/select/Option.js +1 -1
  250. package/select/Select.js +235 -227
  251. package/select-view/Core.js +2 -2
  252. package/skeleton/index.js +1 -1
  253. package/slider/Button.js +2 -2
  254. package/slider/index.js +1 -1
  255. package/space/index.js +51 -15
  256. package/spin/DotLoading.js +1 -1
  257. package/spin/index.js +1 -1
  258. package/splitter/Panel.js +1 -1
  259. package/splitter/SplitBar.js +2 -2
  260. package/splitter/Splitter.js +2 -2
  261. package/statistic/index.js +1 -1
  262. package/steps/index.js +1 -1
  263. package/style.css +1 -1
  264. package/switch/index.js +1 -1
  265. package/table/Table.js +3 -3
  266. package/table/index.js +41 -39
  267. package/tabs/Tab.js +3 -3
  268. package/tabs/TabContent.js +2 -2
  269. package/tabs/TabPane.js +1 -1
  270. package/tabs/index.js +2 -2
  271. package/tag/index.js +2 -2
  272. package/time-picker/Picker.js +1 -1
  273. package/time-picker/TimePicker.js +1 -1
  274. package/timeline/Item.js +1 -1
  275. package/timeline/Timeline.js +1 -1
  276. package/tooltip/index.js +1 -1
  277. package/tour/index.js +20 -18
  278. package/transfer/Item.js +3 -3
  279. package/transfer/List.js +3 -3
  280. package/transfer/index.js +1 -1
  281. package/tree/Animation.js +2 -2
  282. package/tree/Node.js +3 -3
  283. package/tree/NodeList.js +1 -1
  284. package/tree/Tree.js +2 -2
  285. package/tree/index.js +1 -1
  286. package/tree-select/Select.js +4 -4
  287. package/tree-select/index.js +1 -1
  288. package/trigger/index.js +1 -1
  289. package/types/common/hooks/src/index.d.ts +1 -5
  290. package/types/common/hooks/src/use-url-state/index.d.ts +1 -1
  291. package/types/common/hooks/useId.d.ts +1 -1
  292. package/types/common/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
  293. package/types/common/hooks/useKeyboardEvent.d.ts +1 -1
  294. package/types/common/hooks/{useListenResize.d.ts → useListenWindowResize.d.ts} +4 -6
  295. package/types/common/hooks/useWatch.d.ts +1 -1
  296. package/types/common/hooks/useWindowSize.d.ts +2 -2
  297. package/types/common/utils/index.d.ts +47 -0
  298. package/types/common/utils/keyboardCode.d.ts +4 -0
  299. package/types/common/utils/math.d.ts +1 -0
  300. package/types/common/utils/mitt.d.ts +1 -0
  301. package/types/common/utils/pinyin.d.ts +1 -0
  302. package/types/common/utils/reactTransitionGroup.d.ts +1 -0
  303. package/types/common/utils/uuid.d.ts +1 -0
  304. package/types/common/utils/validate.d.ts +1 -0
  305. package/types/pc/config-provider/interface.d.ts +2 -0
  306. package/types/pc/date-picker/RangePicker.d.ts +1 -1
  307. package/types/pc/form/index.d.ts +6 -1
  308. package/types/pc/hooks/index.d.ts +2 -2
  309. package/types/pc/hooks/useCreation.d.ts +1 -0
  310. package/types/pc/hooks/useListenWindowResize.d.ts +1 -0
  311. package/types/pc/index.d.ts +2 -0
  312. package/types/pc/message/index.d.ts +1 -0
  313. package/types/pc/message/interface.d.ts +2 -2
  314. package/types/pc/page-header/interface.d.ts +3 -0
  315. package/types/pc/rich-text/blots/block.d.ts +34 -0
  316. package/types/pc/rich-text/blots/break.d.ts +8 -0
  317. package/types/pc/rich-text/blots/container.d.ts +4 -0
  318. package/types/pc/rich-text/blots/cursor.d.ts +26 -0
  319. package/types/pc/rich-text/blots/embed.d.ts +18 -0
  320. package/types/pc/rich-text/blots/inline.d.ts +12 -0
  321. package/types/pc/rich-text/blots/scroll.d.ts +49 -0
  322. package/types/pc/rich-text/blots/text.d.ts +5 -0
  323. package/types/pc/rich-text/constant.d.ts +1 -0
  324. package/types/pc/rich-text/core/composition.d.ts +12 -0
  325. package/types/pc/rich-text/core/editor.d.ts +28 -0
  326. package/types/pc/rich-text/core/emitter.d.ts +37 -0
  327. package/types/pc/rich-text/core/instances.d.ts +3 -0
  328. package/types/pc/rich-text/core/logger.d.ts +7 -0
  329. package/types/pc/rich-text/core/module.d.ts +8 -0
  330. package/types/pc/rich-text/core/rich.d.ts +217 -0
  331. package/types/pc/rich-text/core/selection.d.ts +74 -0
  332. package/types/pc/rich-text/core/theme.d.ts +32 -0
  333. package/types/pc/rich-text/core/utils/createRegistryWithFormats.d.ts +5 -0
  334. package/types/pc/rich-text/core/utils/scrollRectIntoView.d.ts +11 -0
  335. package/types/pc/rich-text/core.d.ts +7 -0
  336. package/types/pc/rich-text/delta/AttributeMap.d.ts +10 -0
  337. package/types/pc/rich-text/delta/Op.d.ts +11 -0
  338. package/types/pc/rich-text/delta/OpIterator.d.ts +13 -0
  339. package/types/pc/rich-text/delta/index.d.ts +45 -0
  340. package/types/pc/rich-text/formats/align.d.ts +5 -0
  341. package/types/pc/rich-text/formats/background.d.ts +5 -0
  342. package/types/pc/rich-text/formats/blockquote.d.ts +6 -0
  343. package/types/pc/rich-text/formats/bold.d.ts +11 -0
  344. package/types/pc/rich-text/formats/code.d.ts +15 -0
  345. package/types/pc/rich-text/formats/color.d.ts +7 -0
  346. package/types/pc/rich-text/formats/direction.d.ts +5 -0
  347. package/types/pc/rich-text/formats/font.d.ts +7 -0
  348. package/types/pc/rich-text/formats/formula.d.ts +10 -0
  349. package/types/pc/rich-text/formats/header.d.ts +7 -0
  350. package/types/pc/rich-text/formats/image.d.ts +13 -0
  351. package/types/pc/rich-text/formats/indent.d.ts +8 -0
  352. package/types/pc/rich-text/formats/italic.d.ts +6 -0
  353. package/types/pc/rich-text/formats/link.d.ts +13 -0
  354. package/types/pc/rich-text/formats/list.d.ts +13 -0
  355. package/types/pc/rich-text/formats/script.d.ts +8 -0
  356. package/types/pc/rich-text/formats/size.d.ts +4 -0
  357. package/types/pc/rich-text/formats/strike.d.ts +6 -0
  358. package/types/pc/rich-text/formats/table.d.ts +45 -0
  359. package/types/pc/rich-text/formats/underline.d.ts +6 -0
  360. package/types/pc/rich-text/formats/video.d.ts +14 -0
  361. package/types/pc/rich-text/index.d.ts +6 -0
  362. package/types/pc/rich-text/interface.d.ts +17 -0
  363. package/types/pc/rich-text/modules/clipboard.d.ts +43 -0
  364. package/types/pc/rich-text/modules/history.d.ts +36 -0
  365. package/types/pc/rich-text/modules/input.d.ts +10 -0
  366. package/types/pc/rich-text/modules/keyboard.d.ts +58 -0
  367. package/types/pc/rich-text/modules/normalizeExternalHTML/index.d.ts +2 -0
  368. package/types/pc/rich-text/modules/normalizeExternalHTML/normalizers/googleDocs.d.ts +1 -0
  369. package/types/pc/rich-text/modules/normalizeExternalHTML/normalizers/msWord.d.ts +1 -0
  370. package/types/pc/rich-text/modules/syntax.d.ts +50 -0
  371. package/types/pc/rich-text/modules/table.d.ts +20 -0
  372. package/types/pc/rich-text/modules/tableEmbed.d.ts +27 -0
  373. package/types/pc/rich-text/modules/toolbar.d.ts +24 -0
  374. package/types/pc/rich-text/modules/uiNode.d.ts +19 -0
  375. package/types/pc/rich-text/modules/uploader.d.ts +15 -0
  376. package/types/pc/rich-text/parchment/attributor/attributor.d.ts +17 -0
  377. package/types/pc/rich-text/parchment/attributor/class.d.ts +8 -0
  378. package/types/pc/rich-text/parchment/attributor/store.d.ts +15 -0
  379. package/types/pc/rich-text/parchment/attributor/style.d.ts +8 -0
  380. package/types/pc/rich-text/parchment/blot/abstract/blot.d.ts +115 -0
  381. package/types/pc/rich-text/parchment/blot/abstract/container.d.ts +18 -0
  382. package/types/pc/rich-text/parchment/blot/abstract/leaf.d.ts +29 -0
  383. package/types/pc/rich-text/parchment/blot/abstract/parent.d.ts +50 -0
  384. package/types/pc/rich-text/parchment/blot/abstract/shadow.d.ts +37 -0
  385. package/types/pc/rich-text/parchment/blot/block.d.ts +25 -0
  386. package/types/pc/rich-text/parchment/blot/embed.d.ts +11 -0
  387. package/types/pc/rich-text/parchment/blot/inline.d.ts +28 -0
  388. package/types/pc/rich-text/parchment/blot/scroll.d.ts +34 -0
  389. package/types/pc/rich-text/parchment/blot/text.d.ts +26 -0
  390. package/types/pc/rich-text/parchment/collection/linked-list.d.ts +21 -0
  391. package/types/pc/rich-text/parchment/collection/linked-node.d.ts +6 -0
  392. package/types/pc/rich-text/parchment/error.d.ts +6 -0
  393. package/types/pc/rich-text/parchment/index.d.ts +21 -0
  394. package/types/pc/rich-text/parchment/registry.d.ts +21 -0
  395. package/types/pc/rich-text/parchment/scope.d.ts +14 -0
  396. package/types/pc/rich-text/rich.d.ts +5 -0
  397. package/types/pc/rich-text/themes/base.d.ts +35 -0
  398. package/types/pc/rich-text/themes/bubble.d.ts +18 -0
  399. package/types/pc/rich-text/themes/snow.d.ts +9 -0
  400. package/types/pc/rich-text/ui/color-picker.d.ts +7 -0
  401. package/types/pc/rich-text/ui/icon-picker.d.ts +7 -0
  402. package/types/pc/rich-text/ui/icons.d.ts +51 -0
  403. package/types/pc/rich-text/ui/picker.d.ts +16 -0
  404. package/types/pc/rich-text/ui/tooltip.d.ts +12 -0
  405. package/types/pc/select/interface.d.ts +4 -0
  406. package/types/pc/utils/index.d.ts +2 -0
  407. package/types/pc/utils/mitt.d.ts +1 -0
  408. package/types/pc/utils/names.d.ts +107 -91
  409. package/types/pc/utils/pinyin.d.ts +1 -0
  410. package/types/pc/version/index.d.ts +1 -1
  411. package/typography/Base.js +1 -1
  412. package/typography/Ellipsis.js +5 -3
  413. package/typography/Operations.js +6 -4
  414. package/typography/Paragraph.js +1 -1
  415. package/typography/Typography.js +1 -1
  416. package/typography/useEllipsis.js +1 -1
  417. package/upload/TriggerNode.js +2 -2
  418. package/upload/Upload.js +2 -2
  419. package/utils/contextHolder.js +1 -1
  420. package/utils/index.js +167 -163
  421. package/utils/mitt.js +5 -0
  422. package/utils/names.js +12 -2
  423. package/utils/pinyin.js +5 -0
  424. package/verification-code/VerificationCode.js +1 -1
  425. package/version/index.js +1 -1
  426. package/virtual-list/VirtualList.js +2 -2
  427. package/watermark/Watermark.js +1 -1
  428. package/chunk/5_U1CBIu.js +0 -8
  429. package/chunk/BLOlsa0k.js +0 -11
  430. package/chunk/BTLlOOe9.js +0 -189
  431. package/chunk/C6Aw3qIJ.js +0 -16
  432. package/chunk/CMl7m9nA.js +0 -6
  433. package/chunk/COqvRD0G.js +0 -11
  434. package/chunk/DXlwLh0Y.js +0 -806
  435. package/chunk/DlSv5Vu0.js +0 -16
  436. package/chunk/DmDh7NRL.js +0 -14
  437. package/chunk/Duezix3m.js +0 -25
  438. package/chunk/siEVY1s5.js +0 -33
  439. package/hooks/useCreate.js +0 -4
  440. package/types/common/hooks/src/use-dynamic-list/index.d.ts +0 -18
  441. package/types/common/hooks/src/use-event-emitter/index.d.ts +0 -11
  442. package/types/common/hooks/src/use-map/index.d.ts +0 -8
  443. package/types/common/hooks/src/use-set/index.d.ts +0 -6
  444. package/types/common/hooks/useCreate.d.ts +0 -2
  445. package/types/pc/hooks/useCreate.d.ts +0 -1
  446. package/types/pc/hooks/useListenResize.d.ts +0 -1
  447. /package/hooks/{useListenResize.js → useListenWindowResize.js} +0 -0
@@ -0,0 +1,837 @@
1
+ import { jsx as o, jsxs as A, Fragment as ge } from "react/jsx-runtime";
2
+ import oe from "@unicom-cloud/icons/context";
3
+ import { UI_COMMON_PREFIX as ye, UI_PC_PREFIX as M } from "@unicom-cloud/utils/constant/ui";
4
+ import xe from "lodash/merge";
5
+ import ie, { forwardRef as j, Fragment as Be, memo as ve, useContext as D, createContext as Ze, useRef as S, useImperativeHandle as le, useEffect as _, useState as Je, useMemo as Ke } from "react";
6
+ import { UI_PC_PREFIX as We } from "@unicom-cloud/utils/constant/ui.js";
7
+ import Ye from "lodash/isPlainObject";
8
+ import { C as et } from "./CjNkKiBA.js";
9
+ import { s as tt } from "./BE7UY3my.js";
10
+ import { u as Z } from "./FgWHhRFz.js";
11
+ import { b as be } from "./BJ9_azwQ.js";
12
+ import { createRoot as Pe } from "react-dom/client";
13
+ import nt from "@unicom-cloud/icons/IconUiCheckCircleFill";
14
+ import he from "@unicom-cloud/icons/IconUiClose";
15
+ import ot from "@unicom-cloud/icons/IconUiCloseCircleFill";
16
+ import it from "@unicom-cloud/icons/IconUiExclamationCircleFill";
17
+ import rt from "@unicom-cloud/icons/IconUiInfoCircleFill";
18
+ import st from "@unicom-cloud/icons/IconUiLoading";
19
+ import { setConfigProviderProps as ct } from "../modal/config.js";
20
+ import re from "lodash/isNumber";
21
+ import Ie from "lodash/isUndefined";
22
+ import { createPortal as lt } from "react-dom";
23
+ import { P as Ee } from "./B--6x-RL.js";
24
+ import b from "@unicom-cloud/utils/class-name";
25
+ import at from "@unicom-cloud/icons/IconUiEmpty";
26
+ import ft from "lodash/isArray";
27
+ import { t as mt } from "./CTMmW21t.js";
28
+ import dt from "../locale/zh-CN.js";
29
+ import _e from "../notification/withNotification.js";
30
+ import "./DsaQZE4X.js";
31
+ import "./CdXR6dj7.js";
32
+ import "@unicom-cloud/utils/js-cookie";
33
+ import "dayjs";
34
+ import "lodash/debounce";
35
+ import "@unicom-cloud/utils/screenfull";
36
+ import "./BDgzrqDN.js";
37
+ import "lodash/throttle";
38
+ import "@unicom-cloud/utils/constant/platform";
39
+ import "@unicom-cloud/utils/query-string";
40
+ import "react-router";
41
+ import "lodash/isEqualWith";
42
+ import "@unicom-cloud/utils/constant/keyboardCode";
43
+ import "./d1c9z8T1.js";
44
+ import "@unicom-cloud/utils/date";
45
+ import "@unicom-cloud/utils/case-name";
46
+ import "@unicom-cloud/utils/clipboard-copy";
47
+ import "./DS_deHpN.js";
48
+ import "@unicom-cloud/utils/file/fileToURL";
49
+ import "lodash/escapeRegExp";
50
+ import "lodash/isString";
51
+ import "lodash/isFunction";
52
+ import "lodash/camelCase";
53
+ import "lodash/capitalize";
54
+ import "lodash/cloneDeep";
55
+ import "lodash/get";
56
+ import "lodash/has";
57
+ import "lodash/kebabCase";
58
+ import "lodash/mergeWith";
59
+ import "lodash/set";
60
+ import "lodash/setWith";
61
+ import "lodash/snakeCase";
62
+ import "lodash/startCase";
63
+ import "lodash/uniq";
64
+ import "lodash/upperFirst";
65
+ import "@unicom-cloud/utils/math";
66
+ import "@unicom-cloud/utils/mitt";
67
+ import "@unicom-cloud/utils/pinyin";
68
+ import "./CXrVhA6-.js";
69
+ import "@unicom-cloud/utils/file/saveAs";
70
+ import "@unicom-cloud/utils/tinycolor";
71
+ import "@unicom-cloud/utils/ui-color";
72
+ import "react-is";
73
+ import "@unicom-cloud/utils/tree";
74
+ import { isString as we, isNumber as L, isUndefined as te } from "@unicom-cloud/utils/is";
75
+ import "uuid";
76
+ import "./hc_ufgVf.js";
77
+ import "./RjJoagzL.js";
78
+ import "@unicom-cloud/utils/constant";
79
+ function pt(e) {
80
+ if (!Ye(e)) return;
81
+ const { prefix: t = We, dir: r = "ltr" } = e, l = et;
82
+ l.setAttribute("dir", r), l.classList.remove("ltr"), l.classList.remove("rtl"), l.classList.add(r);
83
+ }
84
+ const $e = {
85
+ mini: 4,
86
+ small: 8,
87
+ medium: 16,
88
+ large: 24
89
+ }, ut = {
90
+ size: "small",
91
+ direction: "horizontal"
92
+ }, ae = j(
93
+ (e, t) => {
94
+ const r = Z(e, ut, {}), {
95
+ className: l,
96
+ style: a,
97
+ children: n,
98
+ gap: i,
99
+ size: u,
100
+ direction: c = "horizontal",
101
+ align: s,
102
+ alignItems: m,
103
+ justifyContent: d,
104
+ wrap: C,
105
+ split: $,
106
+ rtl: g,
107
+ ...p
108
+ } = r, f = `${ye}-space`, x = i ?? u, N = m ?? s ?? (c === "horizontal" ? "center" : ""), h = b(
109
+ f,
110
+ {
111
+ [`${f}-${c}`]: c,
112
+ [`${f}-justify-content-${d}`]: d,
113
+ [`${f}-align-items-${N}`]: N,
114
+ [`${f}-rtl`]: g
115
+ },
116
+ C ? `${f}-wrap` : `${f}-no-wrap`,
117
+ l
118
+ ), y = (v) => re(v) ? v : $e[v] ?? $e.small, V = {
119
+ ...(() => {
120
+ if (typeof x == "string" || typeof x == "number")
121
+ return {
122
+ gap: `${y(x)}px`
123
+ };
124
+ if (ft(x)) {
125
+ const v = y(x[1]), T = y(x[0]);
126
+ return {
127
+ rowGap: `${v}px`,
128
+ columnGap: `${T}px`
129
+ };
130
+ }
131
+ return {};
132
+ })(),
133
+ ...a
134
+ }, J = mt(n);
135
+ return /* @__PURE__ */ o("div", { ref: t, className: h, style: V, ...p, children: J.map((v, T) => {
136
+ const K = v?.key ?? T, G = $ != null && T > 0;
137
+ return /* @__PURE__ */ A(Be, { children: [
138
+ G && /* @__PURE__ */ o("div", { className: `${f}-item-split`, children: $ }),
139
+ /* @__PURE__ */ o("div", { className: `${f}-item`, children: v })
140
+ ] }, K);
141
+ }) });
142
+ }
143
+ );
144
+ ae.displayName = "Space";
145
+ const Re = j(
146
+ (e, t) => /* @__PURE__ */ o(ae, { ...e, ref: t, direction: "vertical" })
147
+ );
148
+ Re.displayName = "SpaceVertical";
149
+ const Ct = Object.assign(ae, {
150
+ Vertical: Re
151
+ }), gt = (e, t) => {
152
+ const {
153
+ style: r,
154
+ className: l,
155
+ description: a = "无数据",
156
+ // 默认描述文本
157
+ icon: n,
158
+ imgSrc: i,
159
+ prefixCls: u,
160
+ ...c
161
+ } = e, s = `${ye}-empty`, m = u ?? s, d = typeof a == "string" ? a : "empty", C = () => i ? /* @__PURE__ */ o(
162
+ "img",
163
+ {
164
+ className: b(`${s}-img`, `${m}-img`),
165
+ alt: d,
166
+ src: i,
167
+ loading: "lazy"
168
+ }
169
+ ) : n ? /* @__PURE__ */ o("div", { className: b(`${s}-icon`, `${m}-icon`), children: n }) : /* @__PURE__ */ o(at, { className: b(`${s}-icon`, `${m}-icon`) });
170
+ return /* @__PURE__ */ A(
171
+ Ct.Vertical,
172
+ {
173
+ ref: t,
174
+ className: b(s, m, l),
175
+ style: r,
176
+ justifyContent: "center",
177
+ alignItems: "center",
178
+ gap: 5,
179
+ ...c,
180
+ children: [
181
+ C(),
182
+ /* @__PURE__ */ o("div", { className: b(`${s}-description`, `${m}-description`), children: a })
183
+ ]
184
+ }
185
+ );
186
+ }, Te = ve(
187
+ j(gt)
188
+ );
189
+ Te.displayName = "Empty";
190
+ function xt(e, t) {
191
+ const {
192
+ getPrefixCls: r,
193
+ locale: l,
194
+ componentConfig: a
195
+ } = D(R), n = Z(
196
+ e,
197
+ {},
198
+ a?.Empty
199
+ ), { ...i } = n, u = r?.("empty"), c = l?.Empty?.noData;
200
+ return /* @__PURE__ */ o(Te, { ref: t, prefixCls: u, description: c, ...i });
201
+ }
202
+ const ke = ve(j(xt));
203
+ ke.displayName = "Empty";
204
+ function ht(e) {
205
+ return /* @__PURE__ */ o(ke, {});
206
+ }
207
+ const Me = {
208
+ locale: dt,
209
+ prefixCls: M,
210
+ getPrefixCls(e, t) {
211
+ return `${t || M}-${e}`;
212
+ },
213
+ getPopupContainer() {
214
+ return window.document.body;
215
+ },
216
+ size: "default",
217
+ renderEmpty: ht
218
+ }, R = Ze({
219
+ ...Me
220
+ });
221
+ function $t(e, t) {
222
+ const {
223
+ children: r,
224
+ className: l,
225
+ disabled: a,
226
+ prefix: n,
227
+ size: i = "default",
228
+ ...u
229
+ } = e, { getPrefixCls: c } = D(R), s = c?.("icon-hover"), m = S();
230
+ return le(t, () => ({
231
+ getRootDOMNode: () => m.current
232
+ })), /* @__PURE__ */ o(
233
+ "span",
234
+ {
235
+ ref: m,
236
+ className: b(
237
+ s,
238
+ {
239
+ [`${n}-icon-hover`]: n,
240
+ [`${s}-size-${i}`]: i && i !== "default",
241
+ [`${s}-disabled`]: a
242
+ },
243
+ l
244
+ ),
245
+ onClick: e.onClick,
246
+ ...u,
247
+ children: r
248
+ }
249
+ );
250
+ }
251
+ const Ne = ie.forwardRef($t), Nt = {
252
+ type: "info",
253
+ showIcon: !0,
254
+ noticeType: "message",
255
+ duration: 3e3
256
+ };
257
+ function yt(e, t) {
258
+ const {
259
+ getPrefixCls: r,
260
+ componentConfig: l,
261
+ rtl: a
262
+ } = D(R), n = Z(
263
+ e,
264
+ Nt,
265
+ l?.Notice
266
+ ), i = D(R), u = r?.("notice");
267
+ S();
268
+ const c = S(), s = S(), m = S(), {
269
+ title: d,
270
+ content: C,
271
+ showIcon: $,
272
+ className: g,
273
+ style: p,
274
+ type: f,
275
+ btn: x,
276
+ icon: N,
277
+ prefixCls: h,
278
+ closable: y,
279
+ noticeType: O,
280
+ iconPrefix: V,
281
+ rtl: J = a,
282
+ closeIcon: v,
283
+ classPrefixCls: T
284
+ } = n, K = b(
285
+ h,
286
+ `${h}-${f}`,
287
+ {
288
+ [`${h}-closable`]: y,
289
+ [`${h}-rtl`]: J
290
+ },
291
+ g
292
+ );
293
+ let G = "closable" in n ? y : !0, W = $;
294
+ f === "normal" && !N && (W = !1);
295
+ const pe = { ...i };
296
+ T && (pe.prefixCls = T);
297
+ function Xe() {
298
+ return s.current;
299
+ }
300
+ function Y() {
301
+ const { duration: k, onClose: q, id: ee } = n;
302
+ k !== 0 && (c.current = window.setTimeout(() => {
303
+ q?.(ee), z();
304
+ }, k));
305
+ }
306
+ function z() {
307
+ c.current && (window.clearTimeout(c.current), c.current = null);
308
+ }
309
+ function X() {
310
+ n.onClose?.(n.id);
311
+ }
312
+ function ue() {
313
+ const { showIcon: k, icon: q, type: ee, iconPrefix: Ce } = n;
314
+ let I;
315
+ if (q)
316
+ I = q;
317
+ else if (k) {
318
+ switch (ee) {
319
+ case "info":
320
+ I = /* @__PURE__ */ o(rt, {});
321
+ break;
322
+ case "success":
323
+ I = /* @__PURE__ */ o(nt, {});
324
+ break;
325
+ case "error":
326
+ I = /* @__PURE__ */ o(ot, {});
327
+ break;
328
+ case "warning":
329
+ I = /* @__PURE__ */ o(it, {});
330
+ break;
331
+ case "loading":
332
+ I = /* @__PURE__ */ o(st, {});
333
+ break;
334
+ }
335
+ I = /* @__PURE__ */ o(
336
+ oe.Provider,
337
+ {
338
+ value: Ce ? { prefixCls: Ce } : {},
339
+ children: I
340
+ }
341
+ );
342
+ }
343
+ return /* @__PURE__ */ o("span", { className: `${h}-icon`, children: I });
344
+ }
345
+ function qe() {
346
+ z();
347
+ }
348
+ function Qe() {
349
+ z(), Y();
350
+ }
351
+ le(t, () => ({
352
+ getRootDOMNode: Xe
353
+ }), []), _(() => {
354
+ const k = m.current;
355
+ return (k && k?.duration !== n.duration || n.update) && (z(), Y()), m.current = n, () => {
356
+ };
357
+ }, [n.duration, n.update]), _(() => (Y(), () => {
358
+ z();
359
+ }), []);
360
+ let F;
361
+ return O === "message" && (G = y, F = /* @__PURE__ */ A(ge, { children: [
362
+ W && ue(),
363
+ /* @__PURE__ */ o("span", { className: `${h}-content`, children: C }),
364
+ G && (v !== void 0 ? /* @__PURE__ */ o("span", { onClick: X, className: `${h}-close-btn`, children: v }) : /* @__PURE__ */ o(
365
+ Ne,
366
+ {
367
+ prefix: h,
368
+ className: `${h}-close-btn`,
369
+ onClick: X,
370
+ children: /* @__PURE__ */ o(he, {})
371
+ }
372
+ ))
373
+ ] })), O === "notification" && (F = /* @__PURE__ */ A(ge, { children: [
374
+ W && /* @__PURE__ */ o("div", { className: `${h}-left`, children: ue() }),
375
+ /* @__PURE__ */ A("div", { className: `${h}-right`, children: [
376
+ d && /* @__PURE__ */ o("div", { className: `${h}-title`, children: d }),
377
+ /* @__PURE__ */ o("div", { className: `${h}-content`, children: C }),
378
+ x && /* @__PURE__ */ o("div", { className: `${h}-btn-wrapper`, children: x })
379
+ ] }),
380
+ G && (v !== void 0 ? /* @__PURE__ */ o("span", { onClick: X, className: `${h}-close-btn`, children: v }) : /* @__PURE__ */ o(
381
+ Ne,
382
+ {
383
+ prefix: h,
384
+ className: `${h}-close-btn`,
385
+ onClick: X,
386
+ children: /* @__PURE__ */ o(
387
+ oe.Provider,
388
+ {
389
+ value: V ? { prefixCls: V } : {},
390
+ children: /* @__PURE__ */ o(he, {})
391
+ }
392
+ )
393
+ }
394
+ ))
395
+ ] })), F && (F = /* @__PURE__ */ o(de, { ...pe, childrenName: "notice", children: /* @__PURE__ */ o(
396
+ "div",
397
+ {
398
+ ref: s,
399
+ className: `${u}-${O}`,
400
+ onMouseEnter: qe,
401
+ onMouseLeave: Qe,
402
+ children: /* @__PURE__ */ o("div", { className: K, style: p, role: "alert", children: F })
403
+ }
404
+ ) })), F;
405
+ }
406
+ const Se = j(yt);
407
+ function Ue(e, t) {
408
+ const r = D(R), [l, a] = Je([]);
409
+ function n(c) {
410
+ a((s) => [...s, c]);
411
+ }
412
+ function i(c) {
413
+ a(
414
+ (s) => s.filter((m) => c !== m)
415
+ );
416
+ }
417
+ function u() {
418
+ return r;
419
+ }
420
+ return le(t, () => ({
421
+ addInstance: n,
422
+ removeInstance: i,
423
+ getContextConfig: u
424
+ })), ie.Children.map(
425
+ l,
426
+ (c, s) => ie.cloneElement(c, { key: s })
427
+ );
428
+ }
429
+ Ue.displayName = "ContextHolderElement";
430
+ const Fe = j(Ue);
431
+ function vt(e = {}) {
432
+ const {
433
+ maxCount: t,
434
+ duration: r = 3e3,
435
+ prefixCls: l,
436
+ getContainer: a
437
+ } = e, n = S(void 0), i = /* @__PURE__ */ o(Fe, { ref: n }), u = {};
438
+ let c;
439
+ function s(d) {
440
+ let C, $;
441
+ if (n.current) {
442
+ const N = n.current.getContextConfig();
443
+ $ = N.rtl, C = N.prefixCls;
444
+ }
445
+ const g = l || C, p = me(d.position, $), f = {
446
+ duration: r,
447
+ ...d
448
+ }, x = u[p];
449
+ if (x) {
450
+ if (x.notices.length >= t) {
451
+ const N = x.notices[0];
452
+ f.id = N.id, x.shift();
453
+ }
454
+ x.add({ ...f });
455
+ } else
456
+ c = /* @__PURE__ */ o(
457
+ P,
458
+ {
459
+ ...f,
460
+ prefixCls: g,
461
+ rtl: $,
462
+ getContainer: a,
463
+ ref: (N) => {
464
+ u[p] = N;
465
+ }
466
+ }
467
+ ), n.current.addInstance(c);
468
+ return u[p];
469
+ }
470
+ const m = {};
471
+ return fe.forEach((d) => {
472
+ m[d] = (C) => s({
473
+ ...C,
474
+ type: d
475
+ });
476
+ }), [m, i];
477
+ }
478
+ const fe = [
479
+ "info",
480
+ "success",
481
+ "error",
482
+ "warning",
483
+ "loading",
484
+ "normal"
485
+ ];
486
+ let w = {}, Q = [], Le, je, Oe, se, H;
487
+ function me(e, t) {
488
+ return Ie(e) && (e = t || H ? "topLeft" : "topRight"), e;
489
+ }
490
+ function bt(e) {
491
+ const { prefixCls: t, rtl: r, getContainer: l, notices: a } = e, n = Ie(r) ? H : r, i = me(e.position, n), u = t || je, c = u ? `${u}-notification` : "pqb-notification";
492
+ let s;
493
+ i === "topLeft" || i === "bottomLeft" ? s = "slideNoticeLeft" : s = "slideNoticeRight";
494
+ const m = b(
495
+ `${c}-wrapper`,
496
+ `${c}-wrapper-${i}`,
497
+ { [`${c}-wrapper-rtl`]: H }
498
+ ), d = l?.();
499
+ function C(g) {
500
+ const p = a.find((f) => f.id === g);
501
+ p && e.update({
502
+ ...p,
503
+ style: { ...p.style, opacity: 0 }
504
+ }), setTimeout(() => {
505
+ e.remove(g);
506
+ }, 200);
507
+ }
508
+ _(() => (e.add(e), () => {
509
+ e.clear();
510
+ }), []);
511
+ const $ = /* @__PURE__ */ o("div", { className: m, children: /* @__PURE__ */ o(be, { component: null, children: a.map((g) => /* @__PURE__ */ o(
512
+ Ee,
513
+ {
514
+ timeout: {
515
+ enter: 400,
516
+ exit: 300
517
+ },
518
+ classNames: s,
519
+ onExit: (p) => {
520
+ p && (p.style.height = `${p.scrollHeight}px`);
521
+ },
522
+ onExiting: (p) => {
523
+ p && (p.style.height = 0);
524
+ },
525
+ onExited: (p) => {
526
+ p && (p.style.height = 0, g.onClose?.());
527
+ },
528
+ children: /* @__PURE__ */ o(
529
+ Se,
530
+ {
531
+ ...g,
532
+ onClose: C,
533
+ prefixCls: c,
534
+ iconPrefix: u,
535
+ classPrefixCls: u,
536
+ noticeType: "notification",
537
+ rtl: n
538
+ }
539
+ )
540
+ },
541
+ g.id
542
+ )) }) });
543
+ return d ? lt($, d) : $;
544
+ }
545
+ const P = _e(bt);
546
+ P.useNotification = vt;
547
+ P.config = (e = {}) => {
548
+ re(e.maxCount) && (Le = e.maxCount), e.prefixCls && (je = e.prefixCls), re(e.duration) && (Oe = e.duration), typeof e.rtl == "boolean" && (H = e.rtl), e.getContainer && e.getContainer?.() !== se && (se = e.getContainer(), Object.values(w).forEach(
549
+ (t) => t?.clear?.()
550
+ ), w = {});
551
+ };
552
+ P.clear = () => {
553
+ Object.values(w).forEach((e) => {
554
+ e?.clear();
555
+ });
556
+ };
557
+ P.remove = (e) => {
558
+ Object.values(w).forEach((t) => {
559
+ t?.remove(e);
560
+ });
561
+ };
562
+ P.addInstance = (e) => {
563
+ const t = me(e.position, H), r = w[t], l = {
564
+ duration: Oe,
565
+ ...e
566
+ };
567
+ if (r) {
568
+ const a = r.notices.find(
569
+ (i) => i.id === e.id
570
+ ), n = {
571
+ ...l,
572
+ update: a
573
+ };
574
+ r.notices.length >= Le && (a ? n.id = a.id : r.shift()), r.add({ ...n });
575
+ }
576
+ if (r === null && Q.push(e), r === void 0) {
577
+ const a = document.createElement("div");
578
+ (se || document.body).appendChild(a), Pe(a).render(
579
+ /* @__PURE__ */ o(
580
+ P,
581
+ {
582
+ ...l,
583
+ ref: (i) => {
584
+ if (i) {
585
+ for (let u = 0; u < Q.length; u++)
586
+ i.add(Q[u]);
587
+ Q = [], w[t] = i;
588
+ }
589
+ }
590
+ }
591
+ )
592
+ ), w[t] = null;
593
+ }
594
+ return w[t];
595
+ };
596
+ fe.forEach((e) => {
597
+ P[e] = (t) => P.addInstance({
598
+ ...t,
599
+ type: e
600
+ });
601
+ });
602
+ function Pt(e = {}) {
603
+ const { maxCount: t, duration: r = 3e3, prefixCls: l } = e, a = S(void 0), n = Ke(
604
+ () => /* @__PURE__ */ o(Fe, { ref: a }),
605
+ []
606
+ ), i = {};
607
+ let u;
608
+ function c(m) {
609
+ let d, C;
610
+ if (a.current) {
611
+ const y = a.current.getContextConfig();
612
+ C = y.rtl, d = y.prefixCls;
613
+ }
614
+ const $ = l || d, g = {
615
+ position: "top",
616
+ duration: r,
617
+ ...m
618
+ }, { position: p, transitionClassNames: f } = g;
619
+ let x;
620
+ const N = i[p];
621
+ if (N) {
622
+ const y = N.notices;
623
+ y.length >= t ? (x = y[0].id, N.shift(), N.add({ ...g, id: x })) : x = N.add(g);
624
+ } else
625
+ u = /* @__PURE__ */ o(
626
+ E,
627
+ {
628
+ ...g,
629
+ transitionClassNames: f,
630
+ prefixCls: $,
631
+ rtl: C,
632
+ ref: (y) => {
633
+ i[p] = y;
634
+ }
635
+ }
636
+ ), a.current.addInstance(u);
637
+ return () => {
638
+ i[p]?.remove?.(x);
639
+ };
640
+ }
641
+ const s = {};
642
+ return Ge.forEach((m) => {
643
+ s[m] = (d) => {
644
+ const C = we(d) || L(d) ? { content: d } : d;
645
+ return c({
646
+ ...C,
647
+ type: m
648
+ });
649
+ };
650
+ }), [s, n];
651
+ }
652
+ const Ge = [...fe];
653
+ let U = {}, B = [], ze, Ae, De, ce, He, Ve;
654
+ function It(e) {
655
+ const {
656
+ transitionClassNames: t,
657
+ transitionTimeout: r,
658
+ prefixCls: l,
659
+ rtl: a,
660
+ closable: n,
661
+ notices: i,
662
+ position: u
663
+ } = e;
664
+ function c(p) {
665
+ const f = e.notices.find((x) => x.id === p);
666
+ f && e.update({
667
+ ...f,
668
+ style: { ...f.style, opacity: 0 }
669
+ }), setTimeout(() => {
670
+ e.remove(p);
671
+ }, 100);
672
+ }
673
+ _(() => (e.add(e), () => {
674
+ e.clear();
675
+ }), []);
676
+ const s = l || Ae, m = te(a) ? He : a, d = te(n) ? Ve : n, C = s ? `${s}-message` : "pqb-message", $ = {
677
+ enter: L(r?.enter) ? r?.enter : 100,
678
+ exit: L(r?.exit) ? r?.exit : 300
679
+ }, g = b(
680
+ `${C}-wrapper`,
681
+ `${C}-wrapper-${u}`
682
+ );
683
+ return /* @__PURE__ */ o("div", { className: g, children: /* @__PURE__ */ o(be, { component: null, children: i.map((p) => /* @__PURE__ */ o(
684
+ Ee,
685
+ {
686
+ timeout: $,
687
+ classNames: t || "fadeMessage",
688
+ onExit: (f) => {
689
+ f && (f.style.height = `${f.scrollHeight}px`);
690
+ },
691
+ onExiting: (f) => {
692
+ f && (f.style.height = 0);
693
+ },
694
+ onExited: (f) => {
695
+ f && (f.style.height = 0, p.onClose?.());
696
+ },
697
+ children: /* @__PURE__ */ o(
698
+ Se,
699
+ {
700
+ ...p,
701
+ prefixCls: C,
702
+ classPrefixCls: s,
703
+ iconPrefix: s,
704
+ onClose: c,
705
+ noticeType: "message",
706
+ rtl: m,
707
+ ...te(d) ? {} : { closable: d }
708
+ }
709
+ )
710
+ },
711
+ p.id
712
+ )) }) });
713
+ }
714
+ const E = _e(It);
715
+ E.config = (e = {}) => {
716
+ L(e.maxCount) && (ze = e.maxCount), e.prefixCls && (Ae = e.prefixCls), L(e.duration) && (De = e.duration), typeof e.rtl == "boolean" && (He = e.rtl), typeof e.closable == "boolean" && (Ve = e.closable), e.getContainer?.() !== ce && (ce = e.getContainer(), Object.values(U).forEach((t) => t?.clear()), U = {});
717
+ };
718
+ E.clear = () => {
719
+ Object.values(U).forEach((e) => {
720
+ e?.clear();
721
+ });
722
+ };
723
+ E.addInstance = (e) => {
724
+ const t = {
725
+ position: "top",
726
+ duration: De,
727
+ ...e
728
+ }, { position: r, transitionClassNames: l, transitionTimeout: a } = t;
729
+ let n;
730
+ const i = U[r];
731
+ if (i) {
732
+ const c = i.notices.find(
733
+ (m) => m.id === e.id
734
+ ), s = {
735
+ ...t,
736
+ update: c
737
+ };
738
+ i.notices.length >= ze ? c ? i.add({
739
+ ...s,
740
+ id: c.id
741
+ }) : (i.shift(), i.add(s)) : n = i.add(s);
742
+ }
743
+ if (i === null && B.push(e), i === void 0) {
744
+ const c = document.createElement("div");
745
+ (ce || document.body).appendChild(c), Pe(c).render(
746
+ /* @__PURE__ */ o(
747
+ E,
748
+ {
749
+ transitionClassNames: l,
750
+ transitionTimeout: a,
751
+ ...t,
752
+ ref: (m) => {
753
+ if (m) {
754
+ for (let d = 0; d < B.length; d++)
755
+ m.add(B[d]);
756
+ B = [], U[r] = m;
757
+ }
758
+ }
759
+ }
760
+ )
761
+ ), U[r] = null;
762
+ }
763
+ return () => {
764
+ U[r]?.remove?.(n);
765
+ };
766
+ };
767
+ Ge.forEach((e) => {
768
+ E[e] = (t) => {
769
+ const r = we(t) || L(t) ? { content: t } : t;
770
+ return E.addInstance({
771
+ ...r,
772
+ type: e
773
+ });
774
+ };
775
+ });
776
+ E.useMessage = Pt;
777
+ const Et = Me;
778
+ let ne = {};
779
+ const _t = {};
780
+ function de(e) {
781
+ const t = Z(
782
+ e,
783
+ Et,
784
+ _t
785
+ ), {
786
+ theme: r,
787
+ prefixCls: l = M,
788
+ locale: a,
789
+ rtl: n,
790
+ effectGlobalNotice: i = !0,
791
+ effectGlobalModal: u = !0
792
+ } = t, {
793
+ children: c,
794
+ isRootConfig: s,
795
+ keepConfig: m,
796
+ // 潘启宝添加
797
+ ...d
798
+ } = t;
799
+ (s || m) && (ne = xe({}, ne, d));
800
+ const C = xe({}, ne, d, {
801
+ getPrefixCls: $
802
+ });
803
+ function $(p, f) {
804
+ return `${f || l || M}-${p}`;
805
+ }
806
+ _(() => (s && pt({ prefix: M, dir: n ? "rtl" : "ltr" }), () => {
807
+ }), [s, n]), _(() => (tt({ prefix: M, ...r }), () => {
808
+ }), [r]), _(() => {
809
+ i && (E.config({ prefixCls: l, rtl: n }), P.config({ prefixCls: l, rtl: n }));
810
+ }, [l, n, i]), _(() => {
811
+ u && ct({ locale: a, prefixCls: l, rtl: n });
812
+ }, [a, l, n, u]);
813
+ let g = c;
814
+ return l && l !== M && (g = /* @__PURE__ */ o(oe.Provider, { value: { prefixCls: l }, children: c })), /* @__PURE__ */ o(R.Provider, { value: C, children: g });
815
+ }
816
+ de.ConfigContext = R;
817
+ de.displayName = "ConfigProvider";
818
+ const Yn = R.Consumer;
819
+ export {
820
+ Yn as C,
821
+ ke as E,
822
+ $e as G,
823
+ Ne as I,
824
+ E as M,
825
+ P as N,
826
+ Ct as S,
827
+ R as a,
828
+ de as b,
829
+ Me as c,
830
+ vt as d,
831
+ Fe as e,
832
+ Se as f,
833
+ me as g,
834
+ Ge as m,
835
+ fe as n,
836
+ Pt as u
837
+ };