@unicom-cloud/ui 0.8.71 → 0.8.72

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