@unicom-cloud/ui 0.8.53 → 0.8.55

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 (110) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/Anchor.js +1 -1
  4. package/AutoComplete.js +3 -3
  5. package/Avatar.js +1 -1
  6. package/BackTop.js +1 -1
  7. package/Badge.js +1 -1
  8. package/Breadcrumb.js +2 -2
  9. package/Button.js +1 -1
  10. package/Calendar.js +3 -3
  11. package/Card.js +1 -1
  12. package/Carousel.js +1 -1
  13. package/Cascader.js +1 -1
  14. package/Checkbox.js +1 -1
  15. package/Collapse.js +1 -1
  16. package/ColorPicker.js +3 -3
  17. package/Comment.js +1 -1
  18. package/ConfigProvider.js +2 -2
  19. package/Copy.js +1 -1
  20. package/DatePicker.js +3 -3
  21. package/Descriptions.js +1 -1
  22. package/Divider.js +1 -1
  23. package/Draggable.js +1 -1
  24. package/Drawer.js +1 -1
  25. package/Dropdown.js +1 -1
  26. package/Empty.js +1 -1
  27. package/Form.js +1 -1
  28. package/Grid.js +2 -2
  29. package/Icon.js +1 -1
  30. package/IconHover.js +1 -1
  31. package/Image.js +1 -1
  32. package/Input.js +1 -1
  33. package/InputNumber.js +2 -2
  34. package/InputTag.js +1 -1
  35. package/Layout.js +2 -2
  36. package/Link.js +1 -1
  37. package/List.js +3 -3
  38. package/Mentions.js +3 -3
  39. package/Menu.js +1 -1
  40. package/Message.js +1 -1
  41. package/Modal.js +1 -1
  42. package/Notice.js +2 -2
  43. package/Notification.js +1 -1
  44. package/OverflowEllipsis.js +1 -1
  45. package/PageHeader.js +1 -1
  46. package/Pagination.js +1 -1
  47. package/Picker.js +1 -1
  48. package/Popconfirm.js +1 -1
  49. package/Popover.js +1 -1
  50. package/Progress.js +1 -1
  51. package/Radio.js +2 -2
  52. package/Rate.js +1 -1
  53. package/ResizeBox.js +1 -1
  54. package/Result.js +1 -1
  55. package/Select.js +1 -1
  56. package/SelectView.js +3 -3
  57. package/Skeleton.js +1 -1
  58. package/Slider.js +2 -2
  59. package/Space.js +1 -1
  60. package/Spin.js +1 -1
  61. package/Statistic.js +1 -1
  62. package/Steps.js +1 -1
  63. package/Switch.js +1 -1
  64. package/Table.js +4 -4
  65. package/Tabs.js +1 -1
  66. package/Tag.js +1 -1
  67. package/TimePicker.js +3 -3
  68. package/Timeline.js +1 -1
  69. package/Tooltip.js +1 -1
  70. package/Transfer.js +3 -3
  71. package/Tree.js +1 -1
  72. package/TreeSelect.js +1 -1
  73. package/Trigger.js +1 -1
  74. package/Typography.js +22 -22
  75. package/Upload.js +1 -1
  76. package/VerificationCode.js +1 -1
  77. package/Watermark.js +1 -1
  78. package/chunk/{CmEyvBdT.js → BC0PujUD.js} +2 -2
  79. package/chunk/{B8IzaBdN.js → BH5fVprw.js} +1 -1
  80. package/chunk/{CyVLxv_U.js → BUQBof6z.js} +3 -3
  81. package/chunk/{CBaVCRtG.js → BdJcAQ0Q.js} +1 -1
  82. package/chunk/{BOUZ7hSf.js → BmtF7P8U.js} +2 -2
  83. package/chunk/{CccPQyYX.js → BzMYgxgO.js} +1 -1
  84. package/chunk/{DfMf16uZ.js → BzqZZHGK.js} +2 -2
  85. package/chunk/{CLU6Le34.js → C3I_L73_.js} +1 -1
  86. package/chunk/{8hWViek4.js → CIc4yo9k.js} +1 -1
  87. package/chunk/{COWsswcW.js → CK0H_Yi4.js} +2 -2
  88. package/chunk/{PRN8SqRA.js → CTSIr-Pr.js} +1 -1
  89. package/chunk/CZ8iz63Z.js +641 -0
  90. package/chunk/{DY9WA4bf.js → CqcZfQQ4.js} +1 -1
  91. package/chunk/{Cwp65v9h.js → CzTYWtfa.js} +1 -1
  92. package/chunk/{D3pUE3-b.js → DG7VgAhL.js} +3 -3
  93. package/chunk/{DdVbiC4t.js → DTgc2wl4.js} +2 -2
  94. package/chunk/{D6BMh1k4.js → DZGcv_9A.js} +1 -1
  95. package/chunk/{-sV-N67P.js → DbtCtriE.js} +1 -1
  96. package/chunk/{BEiJmFHq.js → DdtfPvgk.js} +1 -1
  97. package/chunk/{Cz65nXZD.js → Dki1RB5p.js} +2 -2
  98. package/chunk/{CYyPBcnp.js → Niaq_og8.js} +2 -2
  99. package/chunk/{BEVtQ2QL.js → PuuHmqnW.js} +2 -2
  100. package/chunk/{DGK45cuc.js → RL1SNlng.js} +1 -1
  101. package/chunk/{DNyP-r9G.js → RRWbBHK-.js} +2 -2
  102. package/chunk/{CRxPui7e.js → ShWkfsJd.js} +2 -2
  103. package/chunk/{bcn23eHi.js → i1A7W8Qt.js} +1 -1
  104. package/chunk/{Lyg-9NEt.js → xPzFRQJn.js} +19 -18
  105. package/index.js +22 -22
  106. package/package.json +1 -1
  107. package/types/modal/config.d.ts +1 -0
  108. package/types/modal/interface.d.ts +1 -0
  109. package/utils/contextHolder.js +1 -1
  110. package/chunk/BYMRs7t5.js +0 -607
package/chunk/BYMRs7t5.js DELETED
@@ -1,607 +0,0 @@
1
- import { jsx as s, jsxs as R, Fragment as _e } from "react/jsx-runtime";
2
- import en from "@unicom-cloud/icons/IconUiClose";
3
- import we from "lodash/isFunction";
4
- import nn, { forwardRef as Pe, useState as P, useImperativeHandle as tn, useRef as x, useContext as rn, useCallback as S, useEffect as te } from "react";
5
- import Me from "../Button.js";
6
- import { d as T, b as Ie, g as on, e as ln, f as sn, s as an, a as cn, I as un } from "./Lyg-9NEt.js";
7
- import dn from "../hooks/useMergeProps.js";
8
- import fn from "../hooks/useMergeValue.js";
9
- import mn from "../hooks/useOverflowHidden.js";
10
- import pn from "../Portal.js";
11
- import { P as Te } from "./DQ3uFRJD.js";
12
- import ye from "@unicom-cloud/utils/class-name";
13
- import { isServerRendering as Cn, contains as hn } from "../utils/dom.js";
14
- import { Esc as bn } from "../utils/keyCode.js";
15
- import gn from "../utils/omit.js";
16
- import { render as xn, findDOMNode as vn } from "../utils/reactDOM.js";
17
- import kn from "@unicom-cloud/icons/IconUiCheckCircleFill";
18
- import En from "@unicom-cloud/icons/IconUiCloseCircleFill";
19
- import Ne from "@unicom-cloud/icons/IconUiExclamationCircleFill";
20
- import wn from "@unicom-cloud/icons/IconUiInfoCircleFill";
21
- function Mn(n) {
22
- const { prefixCls: a, simple: c } = ln();
23
- return /* @__PURE__ */ s(E, { prefixCls: a, simple: c, ...n, children: n.content });
24
- }
25
- const U = (n) => {
26
- let a = n.icon;
27
- if (!a && a !== null && (a = /* @__PURE__ */ s(Ne, {}), n.isNotice))
28
- switch (n.noticeType) {
29
- case "info":
30
- a = /* @__PURE__ */ s(wn, {});
31
- break;
32
- case "success":
33
- a = /* @__PURE__ */ s(kn, {});
34
- break;
35
- case "warning":
36
- a = /* @__PURE__ */ s(Ne, {});
37
- break;
38
- case "error":
39
- a = /* @__PURE__ */ s(En, {});
40
- break;
41
- }
42
- return n.noticeType === "show" && (a = n.icon), n.isNotice && (n.hideCancel = !0), n.title = a === null && n.title === null ? null : /* @__PURE__ */ R("span", { children: [
43
- a,
44
- n.title
45
- ] }), n;
46
- };
47
- function oe(n, a) {
48
- let c;
49
- const l = document.createElement("div");
50
- document.body.appendChild(l);
51
- const f = on();
52
- function b(i) {
53
- const p = /* @__PURE__ */ s(Ie, { ...f, children: /* @__PURE__ */ s(Mn, { ...i, onCancel: h }) });
54
- c ? c.render(p) : c = xn(p, l);
55
- }
56
- const o = b;
57
- let r = {
58
- ...n,
59
- visible: !1
60
- };
61
- const u = () => {
62
- let i;
63
- const p = n.onOk;
64
- p && (i = p(h)), i && i.then && (r.confirmLoading = !0, o(r), i.then(
65
- () => {
66
- h(!0);
67
- },
68
- (m) => {
69
- console.error(m), r.confirmLoading = !1, o(r);
70
- }
71
- )), i || h(!0);
72
- };
73
- r.onOk = u, r = U(r), r.visible = !0, o(r);
74
- function g() {
75
- c = c == null ? void 0 : c._unmount(), l.parentNode && l.parentNode.removeChild(l);
76
- for (let i = 0; i < T.length; i++)
77
- if (T[i] === v) {
78
- T.splice(i, 1);
79
- break;
80
- }
81
- }
82
- function h(i) {
83
- var p;
84
- !i && ((p = n.onCancel) == null || p.call(n)), v();
85
- }
86
- function M(i) {
87
- r = {
88
- ...r,
89
- title: n.title,
90
- // 避免 newConfig 未传递 title 时,icon 出现多个的问题
91
- ...i
92
- }, r = U(r), o(r);
93
- }
94
- function v() {
95
- r.visible = !1, r.afterClose = () => {
96
- var i;
97
- (i = n.afterClose) == null || i.call(n), g();
98
- }, o(r);
99
- }
100
- return T.push(v), {
101
- close: v,
102
- update: M
103
- };
104
- }
105
- function Tn(n, a) {
106
- const [c, l] = P(!0), [f, b] = P(n);
107
- tn(a, () => ({
108
- update: (u) => {
109
- b(u);
110
- },
111
- close: () => {
112
- l(!1);
113
- }
114
- }));
115
- function o() {
116
- var g;
117
- const u = (g = f.onOk) == null ? void 0 : g.call(f);
118
- u && u.then && (b((h) => ({
119
- ...h,
120
- confirmLoading: !0
121
- })), u.then(
122
- () => {
123
- l(!1);
124
- },
125
- (h) => {
126
- console.error(h), b((M) => ({
127
- ...M,
128
- confirmLoading: !1
129
- }));
130
- }
131
- )), u || l(!1);
132
- }
133
- function r() {
134
- var u;
135
- (u = f.onCancel) == null || u.call(f), l(!1);
136
- }
137
- return /* @__PURE__ */ s(
138
- E,
139
- {
140
- unmountOnExit: !0,
141
- simple: !0,
142
- ...f,
143
- visible: c,
144
- onOk: o,
145
- onCancel: r,
146
- children: f.content
147
- }
148
- );
149
- }
150
- const yn = Pe(Tn);
151
- function Nn() {
152
- const n = x(), a = /* @__PURE__ */ s(sn, { ref: n });
153
- let c = 0;
154
- function l(o) {
155
- var p;
156
- c += 1;
157
- let r, u = { ...o };
158
- function g() {
159
- var m;
160
- (m = o.afterClose) == null || m.call(o), M();
161
- }
162
- const h = /* @__PURE__ */ s(
163
- yn,
164
- {
165
- ref: (m) => {
166
- r = m;
167
- },
168
- ...U({ ...o }),
169
- afterClose: g
170
- },
171
- c
172
- );
173
- (p = n.current) == null || p.addInstance(h);
174
- function M() {
175
- var m;
176
- (m = n.current) == null || m.removeInstance(h);
177
- }
178
- function v() {
179
- r == null || r.close();
180
- }
181
- function i(m) {
182
- u = {
183
- ...u,
184
- ...m
185
- }, r == null || r.update(U({ ...u }));
186
- }
187
- return T.push(v), {
188
- close: v,
189
- update: i
190
- };
191
- }
192
- function f(o) {
193
- return l({
194
- ...o
195
- });
196
- }
197
- const b = {
198
- confirm: f,
199
- show: f
200
- // 潘启宝添加于 2023年10月18日 星期三 10时31分58秒 CST
201
- };
202
- return ["info", "success", "warning", "error"].forEach((o) => {
203
- b[o] = (r) => l({
204
- ...r,
205
- isNotice: !0,
206
- noticeType: o
207
- });
208
- }), [b, a];
209
- }
210
- let re = null, Pn = 0;
211
- Cn || document.documentElement.addEventListener(
212
- "click",
213
- (n) => {
214
- re = {
215
- left: n.clientX,
216
- top: n.clientY
217
- }, setTimeout(() => {
218
- re = null;
219
- }, 100);
220
- },
221
- !0
222
- );
223
- const In = {
224
- mask: !0,
225
- maskClosable: !0,
226
- mountOnEnter: !0,
227
- escToExit: !0,
228
- getPopupContainer: () => document.body,
229
- alignCenter: !0
230
- };
231
- function $n(n, a) {
232
- var Ee;
233
- const c = rn(cn), l = dn(
234
- n,
235
- In,
236
- (Ee = c.componentConfig) == null ? void 0 : Ee.Modal
237
- ), {
238
- className: f,
239
- style: b,
240
- visible: o,
241
- simple: r,
242
- title: u,
243
- subtitle: g,
244
- children: h,
245
- cancelText: M,
246
- okText: v,
247
- okButtonProps: i,
248
- cancelButtonProps: p,
249
- getPopupContainer: m = () => document.body,
250
- footer: L,
251
- afterClose: V,
252
- confirmLoading: $e,
253
- mountOnEnter: z,
254
- unmountOnExit: q,
255
- afterOpen: W,
256
- hideCancel: De,
257
- maskClosable: Oe,
258
- mask: X,
259
- alignCenter: Re,
260
- getChildrenPopupContainer: le,
261
- wrapClassName: Le,
262
- escToExit: Z,
263
- modalRender: se,
264
- maskStyle: Xe,
265
- wrapStyle: Ye,
266
- closeIcon: ie,
267
- fullscreenable: Dn,
268
- ...ae
269
- } = l, I = x(null), ce = x(null), k = x(null), [ue, de] = P(), [fe, Be] = P(), Y = x(null), $ = x(!1), [Fe, me] = P(""), [pe, Ce] = P(""), j = x(!0);
270
- o && j.current && (j.current = !1);
271
- const B = x();
272
- B.current || (B.current = Pn++);
273
- const [He, A] = fn(!1, {
274
- defaultValue: !1,
275
- value: $e
276
- }), d = c.getPrefixCls("modal", l.prefixCls), { locale: K, rtl: he } = c, Se = !r || ae.noticeType === "show", Ue = "closable" in l ? l.closable : Se, Ve = S(() => vn(m()), [m]);
277
- mn(Ve, { hidden: o && X });
278
- function G(e) {
279
- e.stopPropagation(), J();
280
- }
281
- function J() {
282
- var e;
283
- (e = l.onCancel) == null || e.call(l);
284
- }
285
- const ze = (e) => {
286
- Z && o && e.key === bn.key && (e.stopPropagation(), J());
287
- }, Q = x(!1), qe = (e) => {
288
- $.current && ($.current = !1, !Q.current && Oe && X && e.target === e.currentTarget && setTimeout(() => {
289
- J();
290
- }, 100));
291
- }, We = (e) => {
292
- var C;
293
- const t = (C = l.onOk ?? l.onConfirm) == null ? void 0 : C(e);
294
- t != null && t.then && (A(!0), t.then(
295
- () => {
296
- A(!1);
297
- },
298
- (w) => {
299
- A(!1), console.error(w);
300
- }
301
- ));
302
- };
303
- te(() => {
304
- let e = null;
305
- return Z && (e = setTimeout(() => {
306
- var t;
307
- hn(document.body, I.current) && ((t = I.current) == null || t.focus());
308
- })), () => {
309
- e && clearTimeout(e);
310
- };
311
- }, [o, Z]);
312
- const Ze = () => {
313
- var e;
314
- if (o && fe === void 0 && I.current) {
315
- const t = +((e = window.getComputedStyle(I.current, null)) == null ? void 0 : e.zIndex);
316
- isNaN(t) || Be(t + 1);
317
- }
318
- }, je = () => {
319
- if (L === null) return;
320
- const e = /* @__PURE__ */ s(Me, { onClick: G, ...p, children: M || K.Modal.cancelText }), t = /* @__PURE__ */ s(
321
- Me,
322
- {
323
- loading: He,
324
- onClick: We,
325
- type: "primary",
326
- ...i,
327
- children: v || K.Modal.okText
328
- }
329
- ), C = we(L) ? L(e, t) : L || /* @__PURE__ */ R(_e, { children: [
330
- !De && e,
331
- t
332
- ] });
333
- return /* @__PURE__ */ s("div", { className: `${d}-footer`, children: C });
334
- }, _ = x(
335
- xe()
336
- ), Ae = S((e) => {
337
- var C, w, y, N, H;
338
- if (!k.current)
339
- return;
340
- e.preventDefault();
341
- const t = _.current;
342
- t.screenX = e.screenX, t.screenY = e.screenY, t.prewTranslateX = t.translateX, t.prewTranslateY = t.translateY, t.boundingClientRect = ((w = (C = k.current) == null ? void 0 : C.getBoundingClientRect) == null ? void 0 : w.call(C)) ?? {}, t.offsetParentBoundingClientRect = ((H = (N = (y = k.current) == null ? void 0 : y.offsetParent) == null ? void 0 : N.getBoundingClientRect) == null ? void 0 : H.call(N)) ?? {}, F(), Ke();
343
- }, []), be = S((e) => {
344
- e.preventDefault();
345
- const t = _.current, { left: C, right: w, top: y, bottom: N } = t.boundingClientRect ?? {}, { width: H, height: Qe } = t.offsetParentBoundingClientRect ?? {};
346
- let D = Math.max(e.screenX - t.screenX, -C);
347
- D = Math.min(D, H - w);
348
- let O = Math.max(e.screenY - t.screenY, -y);
349
- O = Math.min(O, Qe - N), D += t.prewTranslateX, O += t.prewTranslateY, t.translateX = D, t.translateY = O, me(`translate(${D}px, ${O}px)`);
350
- }, []), ge = S((e) => {
351
- e.preventDefault(), F();
352
- }, []);
353
- function Ke() {
354
- document.documentElement.addEventListener(
355
- "mousemove",
356
- be
357
- ), document.documentElement.addEventListener(
358
- "mouseup",
359
- ge
360
- );
361
- }
362
- function F() {
363
- document.documentElement.removeEventListener(
364
- "mousemove",
365
- be
366
- ), document.documentElement.removeEventListener(
367
- "mouseup",
368
- ge
369
- );
370
- }
371
- function xe() {
372
- return {
373
- screenX: 0,
374
- screenY: 0,
375
- prewTranslateX: 0,
376
- prewTranslateY: 0,
377
- translateX: 0,
378
- translateY: 0,
379
- boundingClientRect: null,
380
- offsetParentBoundingClientRect: null
381
- };
382
- }
383
- function ee() {
384
- _.current = xe(), me(""), Ce("");
385
- }
386
- te(() => () => {
387
- ee(), F();
388
- }, []), te(() => (k.current || (ee(), F()), () => {
389
- }), [k.current]);
390
- const Ge = /* @__PURE__ */ R(
391
- Ie,
392
- {
393
- ...c,
394
- prefixCls: l.prefixCls || c.prefixCls,
395
- locale: K,
396
- zIndex: fe || 1050,
397
- getPopupContainer: (e) => typeof le == "function" ? le(e) : ce.current,
398
- children: [
399
- (!!u || !!g) && /* @__PURE__ */ R("div", { className: `${d}-header`, children: [
400
- !!u && /* @__PURE__ */ s(
401
- "div",
402
- {
403
- className: `${d}-title`,
404
- id: `pqb-dialog-${B.current}`,
405
- children: u
406
- }
407
- ),
408
- !!g && /* @__PURE__ */ s("div", { className: `${d}-subtitle`, children: g })
409
- ] }),
410
- /* @__PURE__ */ s("div", { ref: ce, className: `${d}-content`, children: h }),
411
- je(),
412
- !l.fullscreenable && l.draggable !== !1 && /* @__PURE__ */ s(
413
- "div",
414
- {
415
- className: `${d}-drag-icon`,
416
- onMouseDown: Ae,
417
- onDoubleClick: ee
418
- }
419
- ),
420
- (Ue || !!l.fullscreenable) && (ie !== void 0 ? /* @__PURE__ */ s(
421
- "span",
422
- {
423
- className: `${d}-close-icon`,
424
- onClick: G,
425
- children: ie
426
- }
427
- ) : /* @__PURE__ */ s(
428
- un,
429
- {
430
- tabIndex: -1,
431
- className: `${d}-close-icon`,
432
- onClick: G,
433
- role: "button",
434
- "aria-label": "Close",
435
- children: /* @__PURE__ */ s(en, {})
436
- }
437
- ))
438
- ]
439
- }
440
- ), Je = u ? { "aria-labelledby": `pqb-dialog-${B.current}` } : {}, ve = /* @__PURE__ */ s(
441
- "div",
442
- {
443
- role: "dialog",
444
- "aria-modal": "true",
445
- ...Je,
446
- className: ye(
447
- d,
448
- {
449
- [`${d}-simple`]: r,
450
- [`${d}-rtl`]: he,
451
- [`${d}-fullscreenable`]: l.fullscreenable
452
- },
453
- f
454
- ),
455
- style: {
456
- ...b,
457
- transform: Fe,
458
- transformOrigin: pe
459
- },
460
- ref: k,
461
- children: Ge
462
- }
463
- ), ne = (e) => {
464
- if (pe)
465
- return;
466
- let t = "";
467
- if (Y.current) {
468
- const C = e.getBoundingClientRect(), { left: w, top: y } = Y.current;
469
- t = `${w - C.left}px ${y - C.top}px`;
470
- }
471
- Ce(t);
472
- }, ke = j.current ? !z : !!k.current;
473
- return o || ke ? /* @__PURE__ */ s(
474
- pn,
475
- {
476
- visible: o,
477
- forceRender: ke,
478
- getContainer: m,
479
- children: /* @__PURE__ */ R("div", { ref: a, children: [
480
- X ? /* @__PURE__ */ s(
481
- Te,
482
- {
483
- in: o,
484
- timeout: 400,
485
- appear: !0,
486
- mountOnEnter: z,
487
- classNames: "fadeModal",
488
- unmountOnExit: q,
489
- onEnter: (e) => {
490
- e && (e.style.display = "block");
491
- },
492
- onExited: (e) => {
493
- e && (e.style.display = "none");
494
- },
495
- children: /* @__PURE__ */ s(
496
- "div",
497
- {
498
- "aria-hidden": !0,
499
- className: `${d}-mask`,
500
- style: Xe
501
- }
502
- )
503
- }
504
- ) : null,
505
- /* @__PURE__ */ s(
506
- "div",
507
- {
508
- ...gn(ae, [
509
- "content",
510
- "icon",
511
- "showIcon",
512
- "isNotice",
513
- "noticeType",
514
- "onCancel",
515
- "onOk",
516
- "onConfirm",
517
- "closable",
518
- "prefixCls"
519
- ]),
520
- tabIndex: -1,
521
- ref: (e) => {
522
- I.current = e, Ze();
523
- },
524
- className: ye(
525
- `${d}-wrapper`,
526
- {
527
- [`${d}-wrapper-no-mask`]: !X,
528
- [`${d}-wrapper-align-center`]: Re,
529
- [`${d}-wrapper-rtl`]: he
530
- },
531
- Le
532
- ),
533
- style: {
534
- ...Ye || {},
535
- // 必须 visible=false,立即设置display:none,否则modal加载react-monaco-editor的时候,编辑器显示异常
536
- display: o || ue ? "block" : "none",
537
- overflow: !o && ue ? "hidden" : ""
538
- },
539
- onKeyDown: ze,
540
- onMouseDown: (e) => {
541
- $.current = e.target === e.currentTarget;
542
- },
543
- onClick: qe,
544
- children: /* @__PURE__ */ s(
545
- Te,
546
- {
547
- in: o,
548
- timeout: 400,
549
- appear: !0,
550
- classNames: "zoomModal",
551
- unmountOnExit: q,
552
- mountOnEnter: z,
553
- onEnter: (e) => {
554
- e && (de(!0), Y.current = re, ne(e), k.current = e);
555
- },
556
- onEntered: (e) => {
557
- e && (ne(e), Y.current = null, W == null || W());
558
- },
559
- onExit: () => {
560
- Q.current = !0;
561
- },
562
- onExited: (e) => {
563
- e && (de(!1), ne(e), V == null || V(), Q.current = !1, q && (k.current = null));
564
- },
565
- children: nn.cloneElement(
566
- we(se) ? se(ve) : ve,
567
- {
568
- onMouseDown: () => {
569
- $.current = !1;
570
- },
571
- onMouseUp: () => {
572
- $.current = !1;
573
- }
574
- }
575
- )
576
- }
577
- )
578
- }
579
- )
580
- ] })
581
- }
582
- ) : null;
583
- }
584
- const E = Pe(
585
- $n
586
- );
587
- E.displayName = "Modal";
588
- E.config = an;
589
- E.show = (n) => oe({ ...n, noticeType: "show" });
590
- E.confirm = (n) => oe(n);
591
- E.useModal = Nn;
592
- ["info", "success", "warning", "error"].forEach((n) => {
593
- E[n] = (a) => oe({
594
- ...a,
595
- isNotice: !0,
596
- noticeType: n
597
- });
598
- });
599
- E.destroyAll = () => {
600
- for (; T.length; ) {
601
- const n = T.pop();
602
- n && n();
603
- }
604
- };
605
- export {
606
- E
607
- };