@unicom-cloud/ui 0.8.75 → 0.8.77

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