@unicom-cloud/ui 0.8.52 → 0.8.54

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 (133) hide show
  1. package/Affix.js +41 -40
  2. package/Alert.js +2 -2
  3. package/Anchor.js +1 -1
  4. package/AutoComplete.js +3 -3
  5. package/Avatar.js +1 -1
  6. package/BackTop.js +2 -2
  7. package/Badge.js +2 -2
  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 +1268 -1233
  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 +122 -117
  28. package/Grid.js +86 -83
  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 +2 -2
  41. package/Modal.js +1 -1
  42. package/Notice.js +2 -2
  43. package/Notification.js +2 -2
  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 +33 -32
  54. package/Result.js +1 -1
  55. package/Select.js +1 -1
  56. package/SelectView.js +142 -141
  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 +15 -14
  64. package/Table.js +141 -133
  65. package/Tabs.js +1 -1
  66. package/Tag.js +111 -82
  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 +31 -30
  74. package/Typography.js +25 -25
  75. package/Upload.js +1 -1
  76. package/VerificationCode.js +1 -1
  77. package/Version.js +1 -1
  78. package/Watermark.js +1 -1
  79. package/chunk/{DUX5Hw8l.js → BC0PujUD.js} +3 -3
  80. package/chunk/{Ct7mcZuW.js → BH5fVprw.js} +1 -1
  81. package/chunk/{I0bfWb5y.js → BUQBof6z.js} +95 -93
  82. package/chunk/{DWGwYNvC.js → BdJcAQ0Q.js} +2 -2
  83. package/chunk/{CQvJK4kb.js → BmtF7P8U.js} +12 -12
  84. package/chunk/{DfvdYCUz.js → BzMYgxgO.js} +1 -1
  85. package/chunk/{n58kSv9T.js → BzqZZHGK.js} +11 -5
  86. package/chunk/{5PpvDpEt.js → C3I_L73_.js} +2 -2
  87. package/chunk/{CkIWpIl6.js → CIc4yo9k.js} +1 -1
  88. package/chunk/{dhljdm11.js → CK0H_Yi4.js} +64 -63
  89. package/chunk/{BXZYc88i.js → CTSIr-Pr.js} +3 -3
  90. package/chunk/{4XXtB4ZV.js → CqcZfQQ4.js} +1 -1
  91. package/chunk/{Cku5-xbe.js → CzTYWtfa.js} +47 -46
  92. package/chunk/DG7VgAhL.js +445 -0
  93. package/chunk/DQ3uFRJD.js +892 -0
  94. package/chunk/{DG5zSZDd.js → DTgc2wl4.js} +2 -2
  95. package/chunk/{9AJ-uN8F.js → DZGcv_9A.js} +1 -1
  96. package/chunk/{CoevJNNj.js → DbtCtriE.js} +1 -1
  97. package/chunk/{tkU8zIK4.js → DdtfPvgk.js} +1 -1
  98. package/chunk/{Cw63stMm.js → Dki1RB5p.js} +18 -18
  99. package/chunk/Niaq_og8.js +970 -0
  100. package/chunk/{DCe3olyi.js → PuuHmqnW.js} +101 -99
  101. package/chunk/{BHWpeAbb.js → RL1SNlng.js} +1 -1
  102. package/chunk/{CfqAfcA3.js → RRWbBHK-.js} +2 -2
  103. package/chunk/{B9nYZhXo.js → ShWkfsJd.js} +2 -2
  104. package/chunk/i1A7W8Qt.js +277 -0
  105. package/chunk/qSJXQ1qu.js +640 -0
  106. package/chunk/{z7sBNzI4.js → xPzFRQJn.js} +33 -32
  107. package/index.js +408 -346
  108. package/package.json +1 -23
  109. package/style.css +1 -1
  110. package/types/color-picker/colors.d.ts +1 -1
  111. package/types/date-picker/Picker.d.ts +4 -3
  112. package/types/date-picker/PickerRange.d.ts +3 -7
  113. package/types/date-picker/interface.d.ts +9 -1
  114. package/types/grid/index.d.ts +2 -1
  115. package/types/index.d.ts +1 -0
  116. package/types/modal/config.d.ts +1 -0
  117. package/types/modal/interface.d.ts +1 -0
  118. package/types/pagination/interface.d.ts +1 -0
  119. package/types/picker/InputRange.d.ts +1 -1
  120. package/types/select/Select.d.ts +1 -1
  121. package/types/tag/interface.d.ts +7 -3
  122. package/types/utils/CSSTransition.d.ts +2 -1
  123. package/types/utils/is.d.ts +4 -17
  124. package/types/version/index.d.ts +1 -1
  125. package/utils/CSSTransition.js +1 -1
  126. package/utils/contextHolder.js +1 -1
  127. package/utils/is.js +102 -104
  128. package/utils/reactDOM.js +19 -19
  129. package/chunk/C61BEbHK.js +0 -263
  130. package/chunk/DMeJAY1S.js +0 -606
  131. package/chunk/DXMtLuTP.js +0 -443
  132. package/chunk/m3_n9fBe.js +0 -961
  133. package/chunk/uUGMUxt_.js +0 -474
package/chunk/DMeJAY1S.js DELETED
@@ -1,606 +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 "./z7sBNzI4.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 "./uUGMUxt_.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
- let 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
- let 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
- let t = _.current, { left: C, right: w, top: y, bottom: N } = t.boundingClientRect ?? {}, { width: H, height: Qe } = t.offsetParentBoundingClientRect ?? {}, D = Math.max(e.screenX - t.screenX, -C);
346
- D = Math.min(D, H - w);
347
- let O = Math.max(e.screenY - t.screenY, -y);
348
- O = Math.min(O, Qe - N), D += t.prewTranslateX, O += t.prewTranslateY, t.translateX = D, t.translateY = O, me(`translate(${D}px, ${O}px)`);
349
- }, []), ge = S((e) => {
350
- e.preventDefault(), F();
351
- }, []);
352
- function Ke() {
353
- document.documentElement.addEventListener(
354
- "mousemove",
355
- be
356
- ), document.documentElement.addEventListener(
357
- "mouseup",
358
- ge
359
- );
360
- }
361
- function F() {
362
- document.documentElement.removeEventListener(
363
- "mousemove",
364
- be
365
- ), document.documentElement.removeEventListener(
366
- "mouseup",
367
- ge
368
- );
369
- }
370
- function xe() {
371
- return {
372
- screenX: 0,
373
- screenY: 0,
374
- prewTranslateX: 0,
375
- prewTranslateY: 0,
376
- translateX: 0,
377
- translateY: 0,
378
- boundingClientRect: null,
379
- offsetParentBoundingClientRect: null
380
- };
381
- }
382
- function ee() {
383
- _.current = xe(), me(""), Ce("");
384
- }
385
- te(() => () => {
386
- ee(), F();
387
- }, []), te(() => (k.current || (ee(), F()), () => {
388
- }), [k.current]);
389
- const Ge = /* @__PURE__ */ R(
390
- Ie,
391
- {
392
- ...c,
393
- prefixCls: l.prefixCls || c.prefixCls,
394
- locale: K,
395
- zIndex: fe || 1050,
396
- getPopupContainer: (e) => typeof le == "function" ? le(e) : ce.current,
397
- children: [
398
- (!!u || !!g) && /* @__PURE__ */ R("div", { className: `${d}-header`, children: [
399
- !!u && /* @__PURE__ */ s(
400
- "div",
401
- {
402
- className: `${d}-title`,
403
- id: `pqb-dialog-${B.current}`,
404
- children: u
405
- }
406
- ),
407
- !!g && /* @__PURE__ */ s("div", { className: `${d}-subtitle`, children: g })
408
- ] }),
409
- /* @__PURE__ */ s("div", { ref: ce, className: `${d}-content`, children: h }),
410
- je(),
411
- !l.fullscreenable && l.draggable !== !1 && /* @__PURE__ */ s(
412
- "div",
413
- {
414
- className: `${d}-drag-icon`,
415
- onMouseDown: Ae,
416
- onDoubleClick: ee
417
- }
418
- ),
419
- (Ue || !!l.fullscreenable) && (ie !== void 0 ? /* @__PURE__ */ s(
420
- "span",
421
- {
422
- className: `${d}-close-icon`,
423
- onClick: G,
424
- children: ie
425
- }
426
- ) : /* @__PURE__ */ s(
427
- un,
428
- {
429
- tabIndex: -1,
430
- className: `${d}-close-icon`,
431
- onClick: G,
432
- role: "button",
433
- "aria-label": "Close",
434
- children: /* @__PURE__ */ s(en, {})
435
- }
436
- ))
437
- ]
438
- }
439
- ), Je = u ? { "aria-labelledby": `pqb-dialog-${B.current}` } : {}, ve = /* @__PURE__ */ s(
440
- "div",
441
- {
442
- role: "dialog",
443
- "aria-modal": "true",
444
- ...Je,
445
- className: ye(
446
- d,
447
- {
448
- [`${d}-simple`]: r,
449
- [`${d}-rtl`]: he,
450
- [`${d}-fullscreenable`]: l.fullscreenable
451
- },
452
- f
453
- ),
454
- style: {
455
- ...b,
456
- transform: Fe,
457
- transformOrigin: pe
458
- },
459
- ref: k,
460
- children: Ge
461
- }
462
- ), ne = (e) => {
463
- if (pe)
464
- return;
465
- let t = "";
466
- if (Y.current) {
467
- const C = e.getBoundingClientRect(), { left: w, top: y } = Y.current;
468
- t = `${w - C.left}px ${y - C.top}px`;
469
- }
470
- Ce(t);
471
- }, ke = j.current ? !z : !!k.current;
472
- return o || ke ? /* @__PURE__ */ s(
473
- pn,
474
- {
475
- visible: o,
476
- forceRender: ke,
477
- getContainer: m,
478
- children: /* @__PURE__ */ R("div", { ref: a, children: [
479
- X ? /* @__PURE__ */ s(
480
- Te,
481
- {
482
- in: o,
483
- timeout: 400,
484
- appear: !0,
485
- mountOnEnter: z,
486
- classNames: "fadeModal",
487
- unmountOnExit: q,
488
- onEnter: (e) => {
489
- e && (e.style.display = "block");
490
- },
491
- onExited: (e) => {
492
- e && (e.style.display = "none");
493
- },
494
- children: /* @__PURE__ */ s(
495
- "div",
496
- {
497
- "aria-hidden": !0,
498
- className: `${d}-mask`,
499
- style: Xe
500
- }
501
- )
502
- }
503
- ) : null,
504
- /* @__PURE__ */ s(
505
- "div",
506
- {
507
- ...gn(ae, [
508
- "content",
509
- "icon",
510
- "showIcon",
511
- "isNotice",
512
- "noticeType",
513
- "onCancel",
514
- "onOk",
515
- "onConfirm",
516
- "closable",
517
- "prefixCls"
518
- ]),
519
- tabIndex: -1,
520
- ref: (e) => {
521
- I.current = e, Ze();
522
- },
523
- className: ye(
524
- `${d}-wrapper`,
525
- {
526
- [`${d}-wrapper-no-mask`]: !X,
527
- [`${d}-wrapper-align-center`]: Re,
528
- [`${d}-wrapper-rtl`]: he
529
- },
530
- Le
531
- ),
532
- style: {
533
- ...Ye || {},
534
- // 必须 visible=false,立即设置display:none,否则modal加载react-monaco-editor的时候,编辑器显示异常
535
- display: o || ue ? "block" : "none",
536
- overflow: !o && ue ? "hidden" : ""
537
- },
538
- onKeyDown: ze,
539
- onMouseDown: (e) => {
540
- $.current = e.target === e.currentTarget;
541
- },
542
- onClick: qe,
543
- children: /* @__PURE__ */ s(
544
- Te,
545
- {
546
- in: o,
547
- timeout: 400,
548
- appear: !0,
549
- classNames: "zoomModal",
550
- unmountOnExit: q,
551
- mountOnEnter: z,
552
- onEnter: (e) => {
553
- e && (de(!0), Y.current = re, ne(e), k.current = e);
554
- },
555
- onEntered: (e) => {
556
- e && (ne(e), Y.current = null, W == null || W());
557
- },
558
- onExit: () => {
559
- Q.current = !0;
560
- },
561
- onExited: (e) => {
562
- e && (de(!1), ne(e), V == null || V(), Q.current = !1, q && (k.current = null));
563
- },
564
- children: nn.cloneElement(
565
- we(se) ? se(ve) : ve,
566
- {
567
- onMouseDown: () => {
568
- $.current = !1;
569
- },
570
- onMouseUp: () => {
571
- $.current = !1;
572
- }
573
- }
574
- )
575
- }
576
- )
577
- }
578
- )
579
- ] })
580
- }
581
- ) : null;
582
- }
583
- const E = Pe(
584
- $n
585
- );
586
- E.displayName = "Modal";
587
- E.config = an;
588
- E.show = (n) => oe({ ...n, noticeType: "show" });
589
- E.confirm = (n) => oe(n);
590
- E.useModal = Nn;
591
- ["info", "success", "warning", "error"].forEach((n) => {
592
- E[n] = (a) => oe({
593
- ...a,
594
- isNotice: !0,
595
- noticeType: n
596
- });
597
- });
598
- E.destroyAll = () => {
599
- for (; T.length; ) {
600
- const n = T.pop();
601
- n && n();
602
- }
603
- };
604
- export {
605
- E
606
- };