@unicom-cloud/ui 0.8.71 → 0.8.73

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 (358) hide show
  1. package/Affix.js +2 -2
  2. package/Alert.js +2 -2
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +2 -2
  5. package/Badge.js +2 -2
  6. package/Breadcrumb.js +3 -3
  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/Collapse.js +1 -1
  14. package/ColorPicker.js +1 -1
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +1 -1
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +1 -1
  20. package/Divider.js +1 -1
  21. package/Draggable.js +1 -1
  22. package/Dropdown.js +4 -4
  23. package/Empty.js +1 -1
  24. package/Icon.js +1 -1
  25. package/IconHover.js +1 -1
  26. package/Image.js +1 -1
  27. package/InputNumber.js +1 -1
  28. package/Layout.js +1 -1
  29. package/Link.js +1 -1
  30. package/List.js +2 -2
  31. package/Mentions.js +2 -2
  32. package/Menu.js +1 -1
  33. package/Message.js +6 -5
  34. package/Modal.js +1 -1
  35. package/Notice.js +4 -4
  36. package/Notification.js +7 -6
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Popconfirm.js +2 -2
  40. package/Popover.js +2 -2
  41. package/Progress.js +1 -1
  42. package/Radio.js +1 -1
  43. package/Rate.js +2 -2
  44. package/ResizeBox.js +2 -2
  45. package/Result.js +1 -1
  46. package/SelectView.js +4 -3
  47. package/Skeleton.js +1 -1
  48. package/Slider.js +3 -3
  49. package/Space.js +1 -1
  50. package/SpeechSynthesis.js +20 -20
  51. package/Spin.js +2 -2
  52. package/Statistic.js +1 -1
  53. package/Steps.js +1 -1
  54. package/Switch.js +7 -5
  55. package/Table.js +1 -1
  56. package/Tabs.js +1 -1
  57. package/Tag.js +1 -1
  58. package/Tooltip.js +3 -3
  59. package/Transfer.js +2 -2
  60. package/Tree.js +1 -1
  61. package/Trigger.js +8 -7
  62. package/affix/index.js +2 -2
  63. package/alert/index.js +2 -2
  64. package/anchor/Anchor.js +53 -50
  65. package/anchor/Link.js +1 -1
  66. package/anchor/util.js +1 -1
  67. package/auto-complete/index.js +2 -2
  68. package/avatar/Avatar.js +1 -1
  69. package/avatar/Group.js +1 -1
  70. package/back-top/index.js +2 -2
  71. package/badge/Count.js +1 -1
  72. package/badge/index.js +50 -48
  73. package/breadcrumb/index.js +3 -3
  74. package/button/Group.js +1 -1
  75. package/button/index.js +1 -1
  76. package/calendar/index.js +2 -2
  77. package/card/Grid.js +1 -1
  78. package/card/Meta.js +1 -1
  79. package/card/index.js +1 -1
  80. package/carousel/Arrow.js +1 -1
  81. package/carousel/Indicator.js +1 -1
  82. package/carousel/index.js +1 -1
  83. package/cascader/Cascader.js +4 -4
  84. package/cascader/index.js +1 -1
  85. package/cascader/util.js +1 -1
  86. package/checkbox/Checkbox.js +3 -3
  87. package/checkbox/Group.js +3 -3
  88. package/checkbox/index.js +1 -1
  89. package/chunk/{C5X9bDyX.js → 7HDzVe32.js} +7 -7
  90. package/chunk/{BlElSWJg.js → B0UZ1Ee2.js} +3 -3
  91. package/chunk/{b1e8awfs.js → B0n0iRhF.js} +1 -1
  92. package/chunk/{BzPNDYAX.js → B7hulkj9.js} +2 -2
  93. package/chunk/Bj4EV0eG.js +27 -0
  94. package/chunk/{Bfq4YEcr.js → Bmvhjhzq.js} +9 -8
  95. package/chunk/Byd0ztYY.js +724 -0
  96. package/chunk/{URXCKjXr.js → C0pRaDCf.js} +23 -23
  97. package/chunk/{B4JiMp8I.js → CCVU-Kst.js} +8 -2
  98. package/chunk/{ClaNycDy.js → Cc_-i0o_.js} +2 -2
  99. package/chunk/CiY7w1ZO.js +647 -0
  100. package/chunk/{fFjj2KuF.js → Cj2SQJiO.js} +392 -414
  101. package/chunk/Coz3rCng.js +33 -0
  102. package/chunk/{BHL-PzAD.js → CplLA01W.js} +17 -17
  103. package/chunk/{8V534cS3.js → D2LLXZQX.js} +5 -7
  104. package/chunk/DAAff-FT.js +59 -0
  105. package/chunk/{CQTxhsUk.js → DJDOFlqC.js} +2 -2
  106. package/chunk/DU1RCDfh.js +29 -0
  107. package/chunk/{CdaT1b_F.js → DeV0v__J.js} +2 -2
  108. package/chunk/{I1dqAgn_.js → DejjIa3N.js} +176 -173
  109. package/chunk/{C6AJxF7d.js → Dg0M2OmF.js} +125 -125
  110. package/chunk/{DV7ywe_q.js → RS6OAxzv.js} +2 -2
  111. package/chunk/{CUs1AOCZ.js → UDX9U6M7.js} +3 -3
  112. package/chunk/{Biupwn8l.js → ZrBrCzQX.js} +6 -5
  113. package/chunk/{pEI3aB9Z.js → oHDWCJnz.js} +3 -3
  114. package/chunk/{D2DSUGNT.js → uH6uxyao.js} +1 -1
  115. package/chunk/{D090jlwP.js → xAb6ZgqS.js} +1 -1
  116. package/collapse/Collapse.js +3 -3
  117. package/collapse/Item.js +3 -3
  118. package/collapse/index.js +1 -1
  119. package/color-picker/ControlBar.js +1 -1
  120. package/color-picker/InputAlpha.js +1 -1
  121. package/color-picker/InputHex.js +8 -8
  122. package/color-picker/InputRgb.js +6 -6
  123. package/color-picker/Palette.js +2 -2
  124. package/color-picker/Panel.js +16 -16
  125. package/color-picker/colors.js +4 -4
  126. package/color-picker/index.js +3 -3
  127. package/color-picker/utils.js +1 -1
  128. package/comment/index.js +1 -1
  129. package/config-provider/ConfigProvider.js +2 -2
  130. package/config-provider/context.js +1 -1
  131. package/config-provider/index.js +2 -2
  132. package/copy/index.js +1 -1
  133. package/date-picker/Picker.js +1 -1
  134. package/date-picker/PickerRange.js +2 -2
  135. package/date-picker/index.js +1 -1
  136. package/descriptions/index.js +2 -2
  137. package/divider/index.js +1 -1
  138. package/draggable/index.js +1 -1
  139. package/drawer/Drawer.js +121 -111
  140. package/dropdown/Button.js +1 -1
  141. package/dropdown/index.js +4 -4
  142. package/empty/index.js +1 -1
  143. package/form/Form.js +2 -2
  144. package/form/FormItem.js +2 -2
  145. package/form/promisify.js +9 -8
  146. package/form/store.js +1 -1
  147. package/form/util.js +1 -1
  148. package/grid/Col.js +1 -1
  149. package/grid/Row.js +2 -2
  150. package/grid/grid-item.js +2 -2
  151. package/grid/grid.js +2 -2
  152. package/hooks/index.js +5 -5
  153. package/hooks/useInView.js +1 -1
  154. package/hooks/useIntersectionObserver.js +1 -1
  155. package/hooks/useMergeValue.js +1 -1
  156. package/hooks/useOverflowHidden.js +1 -1
  157. package/hooks/useOverrideRef.js +1 -1
  158. package/hooks/useVerificationCode.js +2 -2
  159. package/icon/index.js +1 -1
  160. package/icon-hover/index.js +1 -1
  161. package/image/Image.js +4 -4
  162. package/image/ImagePreview.js +8 -8
  163. package/image/ImagePreviewArrow.js +1 -1
  164. package/image/ImagePreviewGroup.js +2 -2
  165. package/image/index.js +1 -1
  166. package/index.js +591 -571
  167. package/input/Group.js +1 -1
  168. package/input/Input.js +47 -46
  169. package/input/InputElement.js +3 -3
  170. package/input/Password.js +2 -2
  171. package/input/Search.js +2 -2
  172. package/input/Textarea.js +6 -5
  173. package/input-number/index.js +1 -1
  174. package/input-tag/InputTag.js +52 -50
  175. package/layout/Content.js +1 -1
  176. package/layout/Footer.js +1 -1
  177. package/layout/Header.js +1 -1
  178. package/layout/Sider.js +3 -3
  179. package/layout/index.js +1 -1
  180. package/link/index.js +1 -1
  181. package/list/Item.js +1 -1
  182. package/list/Meta.js +1 -1
  183. package/list/index.js +2 -2
  184. package/locale/en-US.js +1 -1
  185. package/locale/tr-TR.js +1 -1
  186. package/mentions/index.js +2 -2
  187. package/menu/Item.js +1 -1
  188. package/menu/Menu.js +3 -3
  189. package/menu/OverflowWrap.js +1 -1
  190. package/menu/index.js +2 -2
  191. package/message/index.js +6 -5
  192. package/message/useMessage.js +1 -1
  193. package/modal/Confirm.js +2 -2
  194. package/modal/Modal.js +8 -7
  195. package/modal/index.js +1 -1
  196. package/notice/index.js +4 -4
  197. package/notification/index.js +7 -6
  198. package/notification/useNotification.js +1 -1
  199. package/overflow-ellipsis/OverflowItem.js +1 -1
  200. package/overflow-ellipsis/index.js +1 -1
  201. package/package.json +1 -1
  202. package/page-header/index.js +1 -1
  203. package/pagination/PageItem.js +1 -1
  204. package/pagination/PageJumper.js +1 -1
  205. package/pagination/PageOption.js +1 -1
  206. package/pagination/Pagination.js +2 -2
  207. package/picker/Input.js +1 -1
  208. package/picker/InputRange.js +1 -1
  209. package/popconfirm/index.js +2 -2
  210. package/popover/index.js +2 -2
  211. package/progress/index.js +1 -1
  212. package/radio/Group.js +3 -3
  213. package/radio/Radio.js +3 -3
  214. package/radio/index.js +2 -2
  215. package/rate/index.js +26 -26
  216. package/resize-box/ResizeTrigger.js +21 -20
  217. package/resize-box/Split.js +1 -1
  218. package/resize-box/SplitGroup.js +1 -1
  219. package/resize-box/index.js +2 -2
  220. package/result/index.js +1 -1
  221. package/select/Option.js +1 -1
  222. package/select/Select.js +5 -4
  223. package/select/util.js +12 -12
  224. package/select-view/Core.js +3 -3
  225. package/select-view/index.js +2 -1
  226. package/skeleton/index.js +1 -1
  227. package/slider/Button.js +2 -2
  228. package/slider/Tick.js +1 -1
  229. package/slider/index.js +19 -19
  230. package/slider/util.js +8 -8
  231. package/space/index.js +1 -1
  232. package/speech-synthesis/index.js +20 -20
  233. package/spin/DotLoading.js +1 -1
  234. package/spin/index.js +2 -2
  235. package/statistic/Countdown.js +1 -1
  236. package/statistic/index.js +1 -1
  237. package/steps/index.js +1 -1
  238. package/style/variables.less +1 -1
  239. package/style.css +1 -1
  240. package/switch/index.js +16 -14
  241. package/table/Table.js +2 -2
  242. package/table/index.js +3 -3
  243. package/tabs/Tab.js +3 -3
  244. package/tabs/TabContent.js +2 -2
  245. package/tabs/TabPane.js +1 -1
  246. package/tabs/index.js +2 -2
  247. package/tag/index.js +1 -1
  248. package/time-picker/Picker.js +1 -1
  249. package/time-picker/TimePicker.js +1 -1
  250. package/timeline/Item.js +1 -1
  251. package/timeline/Timeline.js +1 -1
  252. package/tooltip/index.js +3 -3
  253. package/transfer/Item.js +2 -2
  254. package/transfer/List.js +2 -2
  255. package/transfer/index.js +2 -2
  256. package/tree/Animation.js +3 -3
  257. package/tree/Node.js +3 -3
  258. package/tree/NodeList.js +2 -2
  259. package/tree/Tree.js +3 -3
  260. package/tree/index.js +1 -1
  261. package/tree-select/Select.js +25 -25
  262. package/trigger/getPopupStyle.js +2 -2
  263. package/trigger/index.js +7 -6
  264. package/types/badge/interface.d.ts +1 -0
  265. package/types/color-picker/colors.d.ts +1 -1
  266. package/types/date-picker/util.d.ts +1 -1
  267. package/types/drawer/interface.d.ts +10 -0
  268. package/types/index.d.ts +0 -7
  269. package/types/modal/Confirm.d.ts +1 -0
  270. package/types/utils/PqbCSSTransition.d.ts +3 -0
  271. package/types/utils/caseName.d.ts +1 -0
  272. package/types/utils/className.d.ts +1 -0
  273. package/types/utils/color.d.ts +1 -0
  274. package/types/utils/computeScrollIntoView.d.ts +1 -0
  275. package/types/utils/contextHolder.d.ts +1 -0
  276. package/types/utils/copy.d.ts +1 -0
  277. package/types/utils/fileToURL.d.ts +1 -0
  278. package/types/utils/fillNBSP.d.ts +1 -0
  279. package/types/utils/getHighlightText.d.ts +1 -0
  280. package/types/utils/getHotkeyHandler.d.ts +1 -0
  281. package/types/utils/getStringLength.d.ts +1 -0
  282. package/types/utils/include.d.ts +1 -0
  283. package/types/utils/index.d.ts +29 -25
  284. package/types/utils/is.d.ts +1 -1
  285. package/types/utils/keyboardCode.d.ts +1 -0
  286. package/types/utils/math.d.ts +1 -0
  287. package/types/utils/mergeProps.d.ts +1 -0
  288. package/types/utils/mergedToString.d.ts +1 -0
  289. package/types/utils/names.d.ts +497 -81
  290. package/types/utils/omit.d.ts +1 -0
  291. package/types/utils/pick.d.ts +1 -1
  292. package/types/utils/reactTransitionGroup.d.ts +1 -0
  293. package/types/utils/responsiveObserve.d.ts +1 -0
  294. package/types/utils/saveAs.d.ts +1 -0
  295. package/types/utils/screenfull.d.ts +1 -0
  296. package/types/utils/scrollIntoView.d.ts +1 -0
  297. package/types/utils/tinycolor.d.ts +1 -0
  298. package/types/utils/tree.d.ts +1 -0
  299. package/types/utils/tween.d.ts +1 -0
  300. package/types/utils/uuid.d.ts +1 -0
  301. package/types/utils/validate.d.ts +1 -0
  302. package/types/version/index.d.ts +1 -1
  303. package/typography/Base.js +6 -5
  304. package/typography/Ellipsis.js +30 -29
  305. package/typography/Paragraph.js +1 -1
  306. package/typography/Typography.js +1 -1
  307. package/typography/index.js +28 -27
  308. package/upload/TriggerNode.js +1 -1
  309. package/upload/Upload.js +60 -58
  310. package/upload/Uploader.js +21 -21
  311. package/upload/request_.js +4 -3
  312. package/utils/PqbCSSTransition.js +5 -0
  313. package/utils/caseName.js +3 -2
  314. package/utils/className.js +3 -2
  315. package/{chunk/B6X4lnd0.js → utils/color.js} +55 -53
  316. package/utils/computeScrollIntoView.js +128 -0
  317. package/utils/contextHolder.js +3 -2
  318. package/utils/copy.js +4 -2
  319. package/utils/fileToURL.js +3 -2
  320. package/utils/fillNBSP.js +2 -1
  321. package/utils/getHighlightText.js +2 -1
  322. package/utils/getHotkeyHandler.js +2 -1
  323. package/utils/getStringLength.js +2 -1
  324. package/utils/include.js +2 -1
  325. package/utils/index.js +302 -249
  326. package/utils/is.js +104 -101
  327. package/utils/keyboardCode.js +2 -1
  328. package/utils/math.js +35 -0
  329. package/utils/mergeProps.js +2 -1
  330. package/utils/mergedToString.js +2 -1
  331. package/utils/names.js +332 -81
  332. package/utils/omit.js +2 -1
  333. package/utils/pick.js +1 -0
  334. package/utils/react19Adapter.js +1 -1
  335. package/utils/reactDOM.js +1 -1
  336. package/utils/reactTransitionGroup.js +10 -0
  337. package/utils/responsiveObserve.js +2 -1
  338. package/utils/saveAs.js +3 -2
  339. package/utils/screenfull.js +2 -1
  340. package/utils/scrollIntoView.js +4 -2
  341. package/utils/tinycolor.js +30 -0
  342. package/utils/tree.js +87 -0
  343. package/utils/tween.js +6 -0
  344. package/utils/uuid.js +5 -0
  345. package/utils/validate.js +7 -0
  346. package/verification-code/VerificationCode.js +1 -1
  347. package/version/index.js +3 -3
  348. package/virtual-list/VirtualList.js +1 -1
  349. package/watermark/Watermark.js +1 -1
  350. package/chunk/BibHFOCF.js +0 -34
  351. package/chunk/CVYWxu00.js +0 -155
  352. package/chunk/CZWGeRVA.js +0 -715
  353. package/chunk/CbLaCJmG.js +0 -26
  354. package/chunk/D-TPB2Do.js +0 -56
  355. package/chunk/Dm1NCTkX.js +0 -629
  356. package/chunk/EHx6bIK_.js +0 -98
  357. package/types/utils/CSSTransition.d.ts +0 -2
  358. package/utils/CSSTransition.js +0 -4
package/chunk/CZWGeRVA.js DELETED
@@ -1,715 +0,0 @@
1
- import z, { forwardRef as X, useContext as D, createContext as _e, useRef as q, useImperativeHandle as Y, useEffect as I, useMemo as je, useState as He } from "react";
2
- import { jsx as r, jsxs as A, Fragment as le } from "react/jsx-runtime";
3
- import Q from "@unicom-cloud/icons/context";
4
- import { n as De } from "./B4JiMp8I.js";
5
- import Se from "lodash/isPlainObject";
6
- import { u as Z } from "./BFTV6myl.js";
7
- import { b as de, P as me } from "./fFjj2KuF.js";
8
- import _ from "lodash/isNumber";
9
- import H from "lodash/isUndefined";
10
- import { createRoot as ue } from "react-dom/client";
11
- import Ue from "@unicom-cloud/icons/IconUiCheckCircleFill";
12
- import ae from "@unicom-cloud/icons/IconUiClose";
13
- import Fe from "@unicom-cloud/icons/IconUiCloseCircleFill";
14
- import Le from "@unicom-cloud/icons/IconUiExclamationCircleFill";
15
- import Ae from "@unicom-cloud/icons/IconUiInfoCircleFill";
16
- import ze from "@unicom-cloud/icons/IconUiLoading";
17
- import Ge from "@unicom-cloud/icons/IconUiEmpty";
18
- import { m as U } from "./JPPo5nY_.js";
19
- import Be from "../locale/zh-CN.js";
20
- import "lodash/isEqualWith";
21
- import "./D-TPB2Do.js";
22
- import "lodash/merge";
23
- import "../utils/dom.js";
24
- import "./Biupwn8l.js";
25
- import "./ClaNycDy.js";
26
- import "./Ce1j9KTi.js";
27
- import "lodash/debounce";
28
- import { createPortal as Je } from "react-dom";
29
- import pe from "../notification/withNotification.js";
30
- import Ke from "lodash/isString";
31
- import { setConfigProviderProps as Qe } from "../modal/config.js";
32
- import { o as Ve } from "./BKKEev13.js";
33
- function We(e, o) {
34
- const {
35
- getPrefixCls: t,
36
- locale: d,
37
- componentConfig: c
38
- } = D(R), i = Z(
39
- e,
40
- {},
41
- c == null ? void 0 : c.Empty
42
- ), { style: a, className: u, description: s, icon: l, imgSrc: f, ...C } = i, g = t("empty"), b = U(g, u), m = d.Empty.noData, n = typeof s == "string" ? s : "empty";
43
- return /* @__PURE__ */ r("div", { ref: o, className: b, style: a, ...C, children: /* @__PURE__ */ A("div", { className: `${g}-wrapper`, children: [
44
- /* @__PURE__ */ r("div", { className: `${g}-image`, children: f ? /* @__PURE__ */ r("img", { alt: n, src: f }) : l || /* @__PURE__ */ r(Ge, {}) }),
45
- /* @__PURE__ */ r("div", { className: `${g}-description`, children: s || m })
46
- ] }) });
47
- }
48
- const Ce = X(We);
49
- Ce.displayName = "Empty";
50
- const Xe = z.memo(Ce);
51
- function Ye(e) {
52
- return /* @__PURE__ */ r(Xe, {});
53
- }
54
- const ge = {
55
- locale: Be,
56
- prefixCls: "pqb",
57
- getPopupContainer: () => document.body,
58
- size: "default",
59
- renderEmpty: Ye
60
- }, R = _e({
61
- getPrefixCls: (e, o) => `${o || "pqb"}-${e}`,
62
- ...ge
63
- });
64
- function Ze(e, o) {
65
- const {
66
- children: t,
67
- className: d,
68
- disabled: c,
69
- prefix: i,
70
- size: a = "default",
71
- ...u
72
- } = e, { getPrefixCls: s } = D(R), l = s("icon-hover"), f = q();
73
- return Y(o, () => ({
74
- getRootDOMNode: () => f.current
75
- })), /* @__PURE__ */ r(
76
- "span",
77
- {
78
- ref: f,
79
- className: U(
80
- l,
81
- {
82
- [`${i}-icon-hover`]: i,
83
- [`${l}-size-${a}`]: a && a !== "default",
84
- [`${l}-disabled`]: c
85
- },
86
- d
87
- ),
88
- onClick: e.onClick,
89
- ...u,
90
- children: t
91
- }
92
- );
93
- }
94
- const fe = z.forwardRef(Ze), et = {
95
- type: "info",
96
- showIcon: !0,
97
- noticeType: "message",
98
- duration: 3e3
99
- };
100
- function tt(e, o) {
101
- const {
102
- getPrefixCls: t,
103
- componentConfig: d,
104
- rtl: c
105
- } = D(R), i = Z(
106
- e,
107
- et,
108
- d == null ? void 0 : d.Notice
109
- ), a = D(R), u = t("notice");
110
- q();
111
- const s = q(), l = q(), f = q(), {
112
- title: C,
113
- content: g,
114
- showIcon: b,
115
- className: m,
116
- style: n,
117
- type: p,
118
- btn: x,
119
- icon: v,
120
- prefixCls: h,
121
- closable: y,
122
- noticeType: M,
123
- iconPrefix: re,
124
- rtl: Me = c,
125
- closeIcon: F,
126
- classPrefixCls: ne
127
- } = i, qe = U(
128
- h,
129
- `${h}-${p}`,
130
- {
131
- [`${h}-closable`]: y,
132
- [`${h}-rtl`]: Me
133
- },
134
- m
135
- );
136
- let G = "closable" in i ? y : !0, B = b;
137
- p === "normal" && !v && (B = !1);
138
- const ie = { ...a };
139
- ne && (ie.prefixCls = ne);
140
- function ke() {
141
- return l.current;
142
- }
143
- function J() {
144
- const { duration: N, onClose: T, id: K } = i;
145
- N !== 0 && (s.current = window.setTimeout(() => {
146
- T == null || T(K), j();
147
- }, N));
148
- }
149
- function j() {
150
- s.current && (window.clearTimeout(s.current), s.current = null);
151
- }
152
- function L() {
153
- var N;
154
- (N = i.onClose) == null || N.call(i, i.id);
155
- }
156
- function se() {
157
- const { showIcon: N, icon: T, type: K, iconPrefix: ce } = i;
158
- let P;
159
- if (T)
160
- P = T;
161
- else if (N) {
162
- switch (K) {
163
- case "info":
164
- P = /* @__PURE__ */ r(Ae, {});
165
- break;
166
- case "success":
167
- P = /* @__PURE__ */ r(Ue, {});
168
- break;
169
- case "error":
170
- P = /* @__PURE__ */ r(Fe, {});
171
- break;
172
- case "warning":
173
- P = /* @__PURE__ */ r(Le, {});
174
- break;
175
- case "loading":
176
- P = /* @__PURE__ */ r(ze, {});
177
- break;
178
- }
179
- P = /* @__PURE__ */ r(
180
- Q.Provider,
181
- {
182
- value: ce ? { prefixCls: ce } : {},
183
- children: P
184
- }
185
- );
186
- }
187
- return /* @__PURE__ */ r("span", { className: `${h}-icon`, children: P });
188
- }
189
- function Oe() {
190
- j();
191
- }
192
- function Te() {
193
- j(), J();
194
- }
195
- Y(o, () => ({
196
- getRootDOMNode: ke
197
- }), []), I(() => {
198
- const N = f.current;
199
- return (N && (N == null ? void 0 : N.duration) !== i.duration || i.update) && (j(), J()), f.current = i, () => {
200
- };
201
- }, [i.duration, i.update]), I(() => (J(), () => {
202
- j();
203
- }), []);
204
- let O;
205
- return M === "message" && (G = y, O = /* @__PURE__ */ A(le, { children: [
206
- B && se(),
207
- /* @__PURE__ */ r("span", { className: `${h}-content`, children: g }),
208
- G && (F !== void 0 ? /* @__PURE__ */ r("span", { onClick: L, className: `${h}-close-btn`, children: F }) : /* @__PURE__ */ r(
209
- fe,
210
- {
211
- prefix: h,
212
- className: `${h}-close-btn`,
213
- onClick: L,
214
- children: /* @__PURE__ */ r(ae, {})
215
- }
216
- ))
217
- ] })), M === "notification" && (O = /* @__PURE__ */ A(le, { children: [
218
- B && /* @__PURE__ */ r("div", { className: `${h}-left`, children: se() }),
219
- /* @__PURE__ */ A("div", { className: `${h}-right`, children: [
220
- C && /* @__PURE__ */ r("div", { className: `${h}-title`, children: C }),
221
- /* @__PURE__ */ r("div", { className: `${h}-content`, children: g }),
222
- x && /* @__PURE__ */ r("div", { className: `${h}-btn-wrapper`, children: x })
223
- ] }),
224
- G && (F !== void 0 ? /* @__PURE__ */ r("span", { onClick: L, className: `${h}-close-btn`, children: F }) : /* @__PURE__ */ r(
225
- fe,
226
- {
227
- prefix: h,
228
- className: `${h}-close-btn`,
229
- onClick: L,
230
- children: /* @__PURE__ */ r(
231
- Q.Provider,
232
- {
233
- value: re ? { prefixCls: re } : {},
234
- children: /* @__PURE__ */ r(ae, {})
235
- }
236
- )
237
- }
238
- ))
239
- ] })), O && (O = /* @__PURE__ */ r(oe, { ...ie, children: /* @__PURE__ */ r(
240
- "div",
241
- {
242
- ref: l,
243
- className: `${u}-${M}`,
244
- onMouseEnter: Oe,
245
- onMouseLeave: Te,
246
- children: /* @__PURE__ */ r("div", { className: qe, style: n, role: "alert", children: O })
247
- }
248
- ) })), O;
249
- }
250
- const he = X(tt);
251
- function ot(e = {}) {
252
- const {
253
- maxCount: o,
254
- duration: t = 3e3,
255
- prefixCls: d,
256
- getContainer: c
257
- } = e, i = q(), a = /* @__PURE__ */ r(Re, { ref: i }), u = {};
258
- let s;
259
- function l(C) {
260
- let g, b;
261
- if (i.current) {
262
- const v = i.current.getContextConfig();
263
- b = v.rtl, g = v.prefixCls;
264
- }
265
- const m = d || g, n = te(C.position, b), p = {
266
- duration: t,
267
- ...C
268
- }, x = u[n];
269
- if (x) {
270
- if (x.notices.length >= o) {
271
- const v = x.notices[0];
272
- p.id = v.id, x.shift();
273
- }
274
- x.add({ ...p });
275
- } else
276
- s = /* @__PURE__ */ r(
277
- $,
278
- {
279
- ...p,
280
- prefixCls: m,
281
- rtl: b,
282
- getContainer: c,
283
- ref: (v) => {
284
- u[n] = v;
285
- }
286
- }
287
- ), i.current.addInstance(s);
288
- return u[n];
289
- }
290
- const f = {};
291
- return ee.forEach((C) => {
292
- f[C] = (g) => l({
293
- ...g,
294
- type: C
295
- });
296
- }), [f, a];
297
- }
298
- const ee = [
299
- "info",
300
- "success",
301
- "error",
302
- "warning",
303
- "loading",
304
- "normal"
305
- ];
306
- let w = {}, xe, be, ve, V, S;
307
- function te(e, o) {
308
- return H(e) && (e = o || S ? "topLeft" : "topRight"), e;
309
- }
310
- function rt(e) {
311
- const { prefixCls: o, rtl: t, getContainer: d, notices: c } = e, i = H(t) ? S : t, a = te(e.position, i), u = o || be, s = u ? `${u}-notification` : "pqb-notification";
312
- let l;
313
- a === "topLeft" || a === "bottomLeft" ? l = "slideNoticeLeft" : l = "slideNoticeRight";
314
- const f = U(
315
- `${s}-wrapper`,
316
- `${s}-wrapper-${a}`,
317
- { [`${s}-wrapper-rtl`]: S }
318
- ), C = d == null ? void 0 : d();
319
- function g(m) {
320
- const n = c.find((p) => p.id === m);
321
- n && e.update({
322
- ...n,
323
- style: { ...n.style, opacity: 0 }
324
- }), setTimeout(() => {
325
- e.remove(m);
326
- }, 200);
327
- }
328
- I(() => (e.add(e), () => {
329
- e.clear();
330
- }), []);
331
- const b = /* @__PURE__ */ r("div", { className: f, children: /* @__PURE__ */ r(de, { component: null, children: c.map((m) => /* @__PURE__ */ r(
332
- me,
333
- {
334
- timeout: {
335
- enter: 400,
336
- exit: 300
337
- },
338
- classNames: l,
339
- onExit: (n) => {
340
- n && (n.style.height = `${n.scrollHeight}px`);
341
- },
342
- onExiting: (n) => {
343
- n && (n.style.height = 0);
344
- },
345
- onExited: (n) => {
346
- var p;
347
- n && (n.style.height = 0, (p = m.onClose) == null || p.call(m));
348
- },
349
- children: /* @__PURE__ */ r(
350
- he,
351
- {
352
- ...m,
353
- onClose: g,
354
- prefixCls: s,
355
- iconPrefix: u,
356
- classPrefixCls: u,
357
- noticeType: "notification",
358
- rtl: i
359
- }
360
- )
361
- },
362
- m.id
363
- )) }) });
364
- return C ? Je(b, C) : b;
365
- }
366
- const $ = pe(rt);
367
- $.useNotification = ot;
368
- $.config = (e = {}) => {
369
- var o;
370
- _(e.maxCount) && (xe = e.maxCount), e.prefixCls && (be = e.prefixCls), _(e.duration) && (ve = e.duration), typeof e.rtl == "boolean" && (S = e.rtl), e.getContainer && ((o = e.getContainer) == null ? void 0 : o.call(e)) !== V && (V = e.getContainer(), Object.values(w).forEach(
371
- (t) => {
372
- var d;
373
- return (d = t == null ? void 0 : t.clear) == null ? void 0 : d.call(t);
374
- }
375
- ), w = {});
376
- };
377
- $.clear = () => {
378
- Object.values(w).forEach((e) => {
379
- e == null || e.clear();
380
- });
381
- };
382
- $.remove = (e) => {
383
- Object.values(w).forEach((o) => {
384
- o == null || o.remove(e);
385
- });
386
- };
387
- $.addInstance = (e) => {
388
- const o = te(e.position, S), t = w[o], d = {
389
- duration: ve,
390
- ...e
391
- };
392
- if (t) {
393
- const c = t.notices.find(
394
- (a) => a.id === e.id
395
- ), i = {
396
- ...d,
397
- update: c
398
- };
399
- t.notices.length >= xe && (c ? i.id = c.id : t.shift()), t.add({ ...i });
400
- }
401
- if (t === void 0) {
402
- const c = document.createElement("div");
403
- (V || document.body).appendChild(c), ue(c).render(
404
- /* @__PURE__ */ r(
405
- $,
406
- {
407
- ...d,
408
- ref: (a) => {
409
- w[o] = a;
410
- }
411
- }
412
- )
413
- ), w[o] = null;
414
- }
415
- return w[o];
416
- };
417
- ee.forEach((e) => {
418
- $[e] = (o) => $.addInstance({
419
- ...o,
420
- type: e
421
- });
422
- });
423
- function nt(e = {}) {
424
- const { maxCount: o, duration: t = 3e3, prefixCls: d } = e, c = q(), i = je(
425
- () => /* @__PURE__ */ r(Re, { ref: c }),
426
- []
427
- ), a = {};
428
- let u;
429
- function s(f) {
430
- let C, g;
431
- if (c.current) {
432
- const y = c.current.getContextConfig();
433
- g = y.rtl, C = y.prefixCls;
434
- }
435
- const b = d || C, m = {
436
- position: "top",
437
- duration: t,
438
- ...f
439
- }, { position: n, transitionClassNames: p } = m;
440
- let x;
441
- const v = a[n];
442
- if (v) {
443
- const y = v.notices;
444
- y.length >= o ? (x = y[0].id, v.shift(), v.add({ ...m, id: x })) : x = v.add(m);
445
- } else
446
- u = /* @__PURE__ */ r(
447
- E,
448
- {
449
- ...m,
450
- transitionClassNames: p,
451
- prefixCls: b,
452
- rtl: g,
453
- ref: (y) => {
454
- a[n] = y;
455
- }
456
- }
457
- ), c.current.addInstance(u);
458
- return () => {
459
- var y, M;
460
- (M = (y = a[n]) == null ? void 0 : y.remove) == null || M.call(y, x);
461
- };
462
- }
463
- const l = {};
464
- return ye.forEach((f) => {
465
- l[f] = (C) => {
466
- const g = Ke(C) ? { content: C } : C;
467
- return s({
468
- ...g,
469
- type: f
470
- });
471
- };
472
- }), [l, i];
473
- }
474
- const ye = [...ee];
475
- let k = {}, Ne, $e, Pe, W, Ee, Ie;
476
- function it(e) {
477
- const {
478
- transitionClassNames: o,
479
- transitionTimeout: t,
480
- prefixCls: d,
481
- rtl: c,
482
- closable: i,
483
- notices: a,
484
- position: u
485
- } = e;
486
- function s(n) {
487
- const p = e.notices.find((x) => x.id === n);
488
- p && e.update({
489
- ...p,
490
- style: { ...p.style, opacity: 0 }
491
- }), setTimeout(() => {
492
- e.remove(n);
493
- }, 100);
494
- }
495
- I(() => (e.add(e), () => {
496
- e.clear();
497
- }), []);
498
- const l = d || $e, f = H(c) ? Ee : c, C = H(i) ? Ie : i, g = l ? `${l}-message` : "pqb-message", b = {
499
- enter: _(t == null ? void 0 : t.enter) ? t == null ? void 0 : t.enter : 100,
500
- exit: _(t == null ? void 0 : t.exit) ? t == null ? void 0 : t.exit : 300
501
- }, m = U(
502
- `${g}-wrapper`,
503
- `${g}-wrapper-${u}`
504
- );
505
- return /* @__PURE__ */ r("div", { className: m, children: /* @__PURE__ */ r(de, { component: null, children: a.map((n) => /* @__PURE__ */ r(
506
- me,
507
- {
508
- timeout: b,
509
- classNames: o || "fadeMessage",
510
- onExit: (p) => {
511
- p && (p.style.height = `${p.scrollHeight}px`);
512
- },
513
- onExiting: (p) => {
514
- p && (p.style.height = 0);
515
- },
516
- onExited: (p) => {
517
- var x;
518
- p && (p.style.height = 0, (x = n.onClose) == null || x.call(n));
519
- },
520
- children: /* @__PURE__ */ r(
521
- he,
522
- {
523
- ...n,
524
- prefixCls: g,
525
- classPrefixCls: l,
526
- iconPrefix: l,
527
- onClose: s,
528
- noticeType: "message",
529
- rtl: f,
530
- ...H(C) ? {} : { closable: C }
531
- }
532
- )
533
- },
534
- n.id
535
- )) }) });
536
- }
537
- const E = pe(it);
538
- E.config = (e = {}) => {
539
- var o;
540
- _(e.maxCount) && (Ne = e.maxCount), e.prefixCls && ($e = e.prefixCls), _(e.duration) && (Pe = e.duration), typeof e.rtl == "boolean" && (Ee = e.rtl), typeof e.closable == "boolean" && (Ie = e.closable), ((o = e.getContainer) == null ? void 0 : o.call(e)) !== W && (W = e.getContainer(), Object.values(k).forEach((t) => t == null ? void 0 : t.clear()), k = {});
541
- };
542
- E.clear = () => {
543
- Object.values(k).forEach((e) => {
544
- e == null || e.clear();
545
- });
546
- };
547
- E.addInstance = (e) => {
548
- const o = {
549
- position: "top",
550
- duration: Pe,
551
- ...e
552
- }, { position: t, transitionClassNames: d, transitionTimeout: c } = o;
553
- let i;
554
- const a = k[t];
555
- if (a) {
556
- const s = a.notices.find(
557
- (f) => f.id === e.id
558
- ), l = {
559
- ...o,
560
- update: s
561
- };
562
- a.notices.length >= Ne ? s ? a.add({
563
- ...l,
564
- id: s.id
565
- }) : (a.shift(), a.add(l)) : i = a.add(l);
566
- }
567
- if (a === void 0) {
568
- const s = document.createElement("div");
569
- (W || document.body).appendChild(s), ue(s).render(
570
- /* @__PURE__ */ r(
571
- E,
572
- {
573
- transitionClassNames: d,
574
- transitionTimeout: c,
575
- ...o,
576
- ref: (f) => {
577
- k[t] = f;
578
- }
579
- }
580
- )
581
- ), k[t] = null;
582
- }
583
- return () => {
584
- var s, l;
585
- (l = (s = k[t]) == null ? void 0 : s.remove) == null || l.call(s, i);
586
- };
587
- };
588
- ye.forEach((e) => {
589
- E[e] = (o) => {
590
- const t = typeof o == "string" ? { content: o } : o;
591
- return E.addInstance({
592
- ...t,
593
- type: e
594
- });
595
- };
596
- });
597
- E.useMessage = nt;
598
- const st = {
599
- primaryColor: {
600
- default: "--pqbblue-6",
601
- hover: "--pqbblue-5",
602
- active: "--pqbblue-7"
603
- },
604
- successColor: {
605
- default: "--green-6",
606
- hover: "--green-5",
607
- active: "--green-7"
608
- },
609
- infoColor: {
610
- default: "--pqbblue-6",
611
- hover: "--pqbblue-5",
612
- active: "--pqbblue-7"
613
- },
614
- warningColor: {
615
- default: "--orangered-6",
616
- hover: "--orangered-5",
617
- active: "--orangered-7"
618
- },
619
- dangerColor: {
620
- default: "--red-6",
621
- hover: "--red-5",
622
- active: "--red-7"
623
- }
624
- }, ct = ge, lt = {};
625
- function oe(e) {
626
- const o = Z(
627
- e,
628
- ct,
629
- lt
630
- ), {
631
- theme: t,
632
- themeMode: d,
633
- prefixCls: c,
634
- children: i,
635
- locale: a,
636
- rtl: u,
637
- effectGlobalNotice: s = !0,
638
- effectGlobalModal: l = !0
639
- } = o, f = window.document.body;
640
- I(() => {
641
- t && Se(t) && Object.entries(st).forEach(([m, n], p, x) => {
642
- const v = t[m];
643
- if (!v) return;
644
- const h = new De(v);
645
- f.style.setProperty(n.default, h.lighten(0).toRgbArrayString()), t[`${m}Hover`] || f.style.setProperty(n.hover, h.lighten(10).toRgbArrayString()), t[`${m}Active`] || f.style.setProperty(n.active, h.lighten(-10).toRgbArrayString());
646
- });
647
- }, [t]), I(() => {
648
- const m = ["pqb-theme"];
649
- return d ? m.forEach((n) => {
650
- f.setAttribute(n, d);
651
- }) : m.forEach((n) => {
652
- f.removeAttribute(n);
653
- }), () => {
654
- };
655
- }, [d]), I(() => {
656
- s && (E.config({ prefixCls: c, rtl: u }), $.config({ prefixCls: c, rtl: u }));
657
- }, [c, u, s]);
658
- function C(m, n) {
659
- return `${n || c}-${m}`;
660
- }
661
- const g = {
662
- ...Ve(o, ["children"]),
663
- getPrefixCls: C
664
- };
665
- I(() => {
666
- l && Qe({ locale: a, prefixCls: c, rtl: u });
667
- }, [a, c, u, l]);
668
- let b = i;
669
- return c && c !== "pqb" && (b = /* @__PURE__ */ r(Q.Provider, { value: { prefixCls: c }, children: i })), /* @__PURE__ */ r(R.Provider, { value: g, children: b });
670
- }
671
- oe.ConfigContext = R;
672
- oe.displayName = "ConfigProvider";
673
- const Lt = R.Consumer;
674
- function we(e, o) {
675
- const t = D(R), [d, c] = He([]);
676
- function i(s) {
677
- c((l) => [...l, s]);
678
- }
679
- function a(s) {
680
- c(
681
- (l) => l.filter((f) => s !== f)
682
- );
683
- }
684
- function u() {
685
- return t;
686
- }
687
- return Y(o, () => ({
688
- addInstance: i,
689
- removeInstance: a,
690
- getContextConfig: u
691
- })), z.Children.map(
692
- d,
693
- (s, l) => z.cloneElement(s, { key: l })
694
- );
695
- }
696
- we.displayName = "ContextHolderElement";
697
- const Re = X(we);
698
- export {
699
- Lt as C,
700
- ge as D,
701
- Xe as E,
702
- fe as I,
703
- E as M,
704
- $ as N,
705
- R as a,
706
- oe as b,
707
- ot as c,
708
- Re as d,
709
- st as e,
710
- he as f,
711
- te as g,
712
- ye as m,
713
- ee as n,
714
- nt as u
715
- };