@unicom-cloud/ui 0.8.60 → 0.8.62

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 (180) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +44 -40
  3. package/Anchor.js +1 -1
  4. package/AutoComplete.js +4 -4
  5. package/Avatar.js +1 -1
  6. package/BackTop.js +7 -7
  7. package/Badge.js +2 -2
  8. package/Breadcrumb.js +22 -22
  9. package/Button.js +2 -2
  10. package/Calendar.js +106 -104
  11. package/Card.js +1 -1
  12. package/Carousel.js +34 -33
  13. package/Cascader.js +1 -1
  14. package/Checkbox.js +1 -1
  15. package/Collapse.js +1 -1
  16. package/ColorPicker.js +12 -12
  17. package/Comment.js +1 -1
  18. package/ConfigProvider.js +2 -2
  19. package/Copy.js +16 -16
  20. package/DatePicker.js +165 -162
  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 +9 -9
  26. package/Empty.js +2 -2
  27. package/Form.js +60 -54
  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 +6 -6
  34. package/InputTag.js +1 -1
  35. package/Layout.js +2 -2
  36. package/Link.js +14 -14
  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 +9 -3
  43. package/Notification.js +2 -2
  44. package/OverflowEllipsis.js +32 -32
  45. package/PageHeader.js +23 -22
  46. package/Pagination.js +1 -1
  47. package/Picker.js +1 -1
  48. package/Popconfirm.js +7 -7
  49. package/Popover.js +1 -1
  50. package/Progress.js +14 -14
  51. package/Radio.js +2 -2
  52. package/Rate.js +43 -40
  53. package/ResizeBox.js +97 -96
  54. package/Result.js +15 -15
  55. package/Select.js +1 -1
  56. package/SelectView.js +295 -249
  57. package/Skeleton.js +1 -1
  58. package/Slider.js +25 -25
  59. package/Space.js +1 -1
  60. package/SpeechSynthesis.js +32 -29
  61. package/Spin.js +2 -2
  62. package/Statistic.js +1 -1
  63. package/Steps.js +11 -11
  64. package/Switch.js +3 -3
  65. package/Table.js +994 -991
  66. package/Tabs.js +1 -1
  67. package/Tag.js +68 -67
  68. package/TimePicker.js +17 -17
  69. package/Timeline.js +1 -1
  70. package/Tooltip.js +1 -1
  71. package/Transfer.js +47 -46
  72. package/Tree.js +2 -2
  73. package/TreeSelect.js +1 -1
  74. package/Trigger.js +3 -3
  75. package/Typography.js +1 -1
  76. package/Upload.js +2 -2
  77. package/VerificationCode.js +1 -1
  78. package/Version.js +1 -1
  79. package/Watermark.js +1 -1
  80. package/chunk/{V6euPXVB.js → -Z968QpN.js} +257 -251
  81. package/chunk/{IooeSKJJ.js → AqH9yP_J.js} +19 -19
  82. package/chunk/{cZiP8FvM.js → B0oDiPqE.js} +1 -1
  83. package/chunk/{B16KHtX-.js → B4-WpgY2.js} +191 -185
  84. package/chunk/{CuOl4X0X.js → B8SZFOjt.js} +1 -1
  85. package/chunk/{CbiWdbr_.js → BXWxA-tS.js} +35 -34
  86. package/chunk/{DpfUGhi4.js → BlNFmhNa.js} +288 -283
  87. package/chunk/{C1xMmQIZ.js → BmO1y0vr.js} +34 -34
  88. package/chunk/{Kbr6FzOG.js → BnqeQYIZ.js} +210 -186
  89. package/chunk/{BPZ-6HKJ.js → Bp3XomF8.js} +1 -2
  90. package/chunk/BsWphzcT.js +20 -0
  91. package/chunk/{RMBPs_Ry.js → C4eJ9vCf.js} +4 -3
  92. package/chunk/{BNHrEI0Y.js → C6fEFlPt.js} +52 -48
  93. package/chunk/C8o-VGyc.js +376 -0
  94. package/chunk/{eK7lxdak.js → CDJ1EnJ2.js} +8 -8
  95. package/chunk/{C5AQWbC4.js → CHyuuVxl.js} +1 -1
  96. package/chunk/{B2vORJQ8.js → CJnshq6A.js} +13 -13
  97. package/chunk/CT1lZ7ss.js +116 -0
  98. package/chunk/{Bdh4XVuf.js → CV1kLw5Z.js} +290 -281
  99. package/chunk/{DmUhn9ib.js → CazXy0r4.js} +54 -53
  100. package/chunk/{BBVjSFnw.js → Cqyp4qni.js} +23 -19
  101. package/chunk/{BJ_7JTqC.js → D3VMG9V1.js} +1 -1
  102. package/chunk/{D2HkyI6A.js → DGasAUHE.js} +2 -2
  103. package/chunk/{YIlBPVAs.js → DRQ1v6Ux.js} +1 -1
  104. package/chunk/{DhBo0pPJ.js → DRp7voqz.js} +119 -118
  105. package/chunk/{gIbzjQ-X.js → Dtm4BmKB.js} +2 -2
  106. package/chunk/{BEDYCG-I.js → KchYsivk.js} +18 -18
  107. package/chunk/{Cbd50gx8.js → Wum88vrW.js} +33 -33
  108. package/chunk/{BjSHZA0m.js → mfn4EgmQ.js} +1 -1
  109. package/chunk/{BYhtrDV3.js → nbEvdwT0.js} +152 -148
  110. package/chunk/{C1D7T29r.js → qpd2axxs.js} +83 -76
  111. package/chunk/{BVLwPZis.js → tOFzwzpT.js} +31 -30
  112. package/chunk/{DSGRHf-1.js → yESVS-qX.js} +157 -156
  113. package/hooks/useMergeValue.js +1 -1
  114. package/icons.js +4 -6001
  115. package/index.js +420 -392
  116. package/locale/en-US.js +1 -1
  117. package/locale/tr-TR.js +1 -1
  118. package/package.json +1 -1
  119. package/style.css +1 -1
  120. package/types/cascader/panel/Search.d.ts +1 -1
  121. package/types/config-provider/interface.d.ts +1 -1
  122. package/types/form/interface.d.ts +1 -1
  123. package/types/index.d.ts +1 -1
  124. package/types/message/index.d.ts +2 -2
  125. package/types/notification/index.d.ts +2 -2
  126. package/types/notification-base/index.d.ts +2 -2
  127. package/types/select/interface.d.ts +1 -0
  128. package/types/select-view/interface.d.ts +1 -0
  129. package/types/table/interface.d.ts +1 -0
  130. package/types/tree/Context.d.ts +1 -0
  131. package/types/tree/Tree.d.ts +1 -1
  132. package/types/tree/index.d.ts +5 -4
  133. package/types/tree/interface.d.ts +1 -0
  134. package/types/utils/index.d.ts +1 -0
  135. package/types/utils/lodash.d.ts +14 -1
  136. package/types/version/index.d.ts +1 -1
  137. package/utils/CSSTransition.js +1 -1
  138. package/utils/caseName.js +2 -18
  139. package/utils/contextHolder.js +1 -1
  140. package/utils/index.js +220 -191
  141. package/utils/is.js +68 -67
  142. package/utils/lodash.js +32 -6
  143. package/utils/reactDOM.js +1 -1
  144. package/chunk/-LZOUh53.js +0 -29
  145. package/chunk/-jdfq71f.js +0 -23
  146. package/chunk/B0GOLsj_.js +0 -58
  147. package/chunk/B7Zsp3gO.js +0 -29
  148. package/chunk/BDjXkzNj.js +0 -23
  149. package/chunk/BHn4xgbv.js +0 -209
  150. package/chunk/BLSiP_gg.js +0 -32
  151. package/chunk/BMJfSSLX.js +0 -23
  152. package/chunk/B_nfMl0e.js +0 -116
  153. package/chunk/BcS17Pzy.js +0 -66
  154. package/chunk/BdiEwtQO.js +0 -41
  155. package/chunk/Bpug_KxP.js +0 -34
  156. package/chunk/C1u_ckwU.js +0 -29
  157. package/chunk/C43Hv2Bl.js +0 -34
  158. package/chunk/C9vsih_D.js +0 -29
  159. package/chunk/CAfR2wLq.js +0 -41
  160. package/chunk/CAfecMDF.js +0 -46
  161. package/chunk/CKp4rZnD.js +0 -207
  162. package/chunk/CV2Aqv9q.js +0 -52
  163. package/chunk/CYdarMv9.js +0 -32
  164. package/chunk/C_S5Mdvd.js +0 -379
  165. package/chunk/CmB-TL7C.js +0 -46
  166. package/chunk/D-ER56Sf.js +0 -29
  167. package/chunk/D-aYnb6u.js +0 -41
  168. package/chunk/D3xQFJcO.js +0 -23
  169. package/chunk/DJcEys80.js +0 -29
  170. package/chunk/DLIm6rRJ.js +0 -29
  171. package/chunk/DOWEHtqM.js +0 -41
  172. package/chunk/DT37l12z.js +0 -40
  173. package/chunk/DW-B7npC.js +0 -23
  174. package/chunk/D_MTFBb0.js +0 -38
  175. package/chunk/Dx_5J4fO.js +0 -29
  176. package/chunk/Dy487FZ1.js +0 -118
  177. package/chunk/Uz-rNulO.js +0 -98
  178. package/chunk/cDZI_t6o.js +0 -52
  179. package/chunk/sScV-J56.js +0 -206
  180. package/chunk/wI2I1qb0.js +0 -23
@@ -1,41 +1,47 @@
1
1
  import { jsxs as F, Fragment as M, jsx as n } from "react/jsx-runtime";
2
2
  import k from "lodash/isFunction";
3
3
  import me from "lodash/isNumber";
4
- import te, { useContext as z, forwardRef as Q, useState as A, useEffect as G, isValidElement as Ie, useRef as ie, useImperativeHandle as fe } from "react";
5
- import { d as W, I as Ue } from "./Bdh4XVuf.js";
6
- import { useMergeProps as xe } from "../hooks/useMergeProps.js";
4
+ import te, { useContext as z, forwardRef as Q, useState as A, useEffect as G, isValidElement as Ue, useRef as ie, useImperativeHandle as fe } from "react";
5
+ import { d as W, I as xe } from "./CV1kLw5Z.js";
6
+ import { useMergeProps as $e } from "../hooks/useMergeProps.js";
7
7
  import { y as X } from "./BzPkh4Zv.js";
8
- import $e from "../utils/omit.js";
8
+ import Ie from "../utils/omit.js";
9
9
  import ce from "../utils/warning.js";
10
- import { _ as we, P as ne } from "./BPZ-6HKJ.js";
11
- import { a as Pe } from "./C1D7T29r.js";
12
- import { I as ge } from "./DJcEys80.js";
13
- import { I as Ce } from "./Bpug_KxP.js";
14
- import { I as Ne } from "./sScV-J56.js";
15
- import { I as ae, a as Fe, b as Ee, c as he, d as Le, e as Re, f as De } from "./CKp4rZnD.js";
16
- import { l as be } from "./CTxjmYmx.js";
10
+ import { _ as we, P as ne } from "./Bp3XomF8.js";
11
+ import { a as Pe } from "./qpd2axxs.js";
12
+ import ge from "@unicom-cloud/icons/IconUiDelete";
13
+ import Ce from "@unicom-cloud/icons/IconUiEye";
14
+ import Ne from "@unicom-cloud/icons/IconUiImageClose";
15
+ import ae from "@unicom-cloud/icons/IconUiUpload";
16
+ import { l as he } from "./CTxjmYmx.js";
17
17
  import { useKeyboardEvent as Y } from "../hooks/useKeyboardEvent.js";
18
18
  import "../utils/is.js";
19
- import { I as Te } from "./-jdfq71f.js";
20
- import Oe from "../Progress.js";
19
+ import Fe from "@unicom-cloud/icons/IconUiCheck";
20
+ import Ee from "@unicom-cloud/icons/IconUiPause";
21
+ import Le from "@unicom-cloud/icons/IconUiPlayArrowFill";
22
+ import Re from "../Progress.js";
21
23
  import re from "../Tooltip.js";
22
24
  import _ from "lodash/isPlainObject";
23
- import { b as ke } from "./BHn4xgbv.js";
24
- import { I as Se } from "./C1u_ckwU.js";
25
- import { H as qe } from "./BBVjSFnw.js";
26
- import { I as de } from "./DW-B7npC.js";
25
+ import De from "@unicom-cloud/icons/IconUiExclamationCircleFill";
26
+ import Te from "@unicom-cloud/icons/IconUiFile";
27
+ import Oe from "@unicom-cloud/icons/IconUiFileAudio";
28
+ import ve from "@unicom-cloud/icons/IconUiFileImage";
29
+ import ke from "@unicom-cloud/icons/IconUiFilePdf";
30
+ import Se from "@unicom-cloud/icons/IconUiFileVideo";
31
+ import { K as qe } from "./Cqyp4qni.js";
32
+ import de from "@unicom-cloud/icons/IconUiPlus";
27
33
  import je from "../Button.js";
28
34
  import Ae from "lodash/isArray";
29
35
  import { NOOP as p } from "../utils/constant.js";
30
- const $ = {
36
+ const I = {
31
37
  init: "init",
32
38
  uploading: "uploading",
33
39
  success: "done",
34
40
  fail: "error"
35
- }, ve = (e) => {
36
- var w, f, l, c, g, b;
37
- const u = Y(), { file: m, prefixCls: s, progressProps: t, progressRender: r } = e, { locale: i } = z(W), { status: o, percent: h = 0 } = m, v = `${s}-list`, I = t && t.width ? { width: t.width } : {}, U = /* @__PURE__ */ F(M, { children: [
38
- o === $.fail && e.reuploadIcon !== null && /* @__PURE__ */ n(
41
+ }, be = (e) => {
42
+ var w, f, o, c, g, v;
43
+ const u = Y(), { file: m, prefixCls: s, progressProps: t, progressRender: r } = e, { locale: i } = z(W), { status: l, percent: h = 0 } = m, b = `${s}-list`, U = t && t.width ? { width: t.width } : {}, x = /* @__PURE__ */ F(M, { children: [
44
+ l === I.fail && e.reuploadIcon !== null && /* @__PURE__ */ n(
39
45
  "span",
40
46
  {
41
47
  className: `${s}-list-reupload-icon`,
@@ -55,26 +61,26 @@ const $ = {
55
61
  children: e.reuploadIcon || (e.listType === "picture-card" ? /* @__PURE__ */ n(ae, {}) : (f = i == null ? void 0 : i.Upload) == null ? void 0 : f.reupload)
56
62
  }
57
63
  ),
58
- o === $.success && e.successIcon !== null && /* @__PURE__ */ n("span", { className: `${s}-list-success-icon`, children: e.successIcon || /* @__PURE__ */ n(Te, {}) }),
59
- o !== $.success && /* @__PURE__ */ F("div", { className: `${v}-status`, style: I, children: [
64
+ l === I.success && e.successIcon !== null && /* @__PURE__ */ n("span", { className: `${s}-list-success-icon`, children: e.successIcon || /* @__PURE__ */ n(Fe, {}) }),
65
+ l !== I.success && /* @__PURE__ */ F("div", { className: `${b}-status`, style: U, children: [
60
66
  /* @__PURE__ */ n(
61
- Oe,
67
+ Re,
62
68
  {
63
69
  showText: !1,
64
- className: `${v}-progress`,
70
+ className: `${b}-progress`,
65
71
  type: "circle",
66
- status: o === $.fail ? "error" : o === $.success ? "success" : "normal",
72
+ status: l === I.fail ? "error" : l === I.success ? "success" : "normal",
67
73
  percent: h,
68
74
  size: "mini",
69
75
  ...t
70
76
  }
71
77
  ),
72
- o === $.init && e.startIcon !== null && /* @__PURE__ */ n(
78
+ l === I.init && e.startIcon !== null && /* @__PURE__ */ n(
73
79
  "span",
74
80
  {
75
81
  tabIndex: 0,
76
82
  role: "button",
77
- "aria-label": (l = i == null ? void 0 : i.Upload) == null ? void 0 : l.start,
83
+ "aria-label": (o = i == null ? void 0 : i.Upload) == null ? void 0 : o.start,
78
84
  className: `${s}-list-start-icon`,
79
85
  onClick: () => {
80
86
  var a;
@@ -86,10 +92,10 @@ const $ = {
86
92
  (a = e.onUpload) == null || a.call(e, m);
87
93
  }
88
94
  }),
89
- children: e.startIcon || /* @__PURE__ */ n(re, { content: (c = i == null ? void 0 : i.Upload) == null ? void 0 : c.start, children: /* @__PURE__ */ n(Fe, {}) })
95
+ children: e.startIcon || /* @__PURE__ */ n(re, { content: (c = i == null ? void 0 : i.Upload) == null ? void 0 : c.start, children: /* @__PURE__ */ n(Le, {}) })
90
96
  }
91
97
  ),
92
- o === $.uploading && e.cancelIcon !== null && /* @__PURE__ */ n(
98
+ l === I.uploading && e.cancelIcon !== null && /* @__PURE__ */ n(
93
99
  "span",
94
100
  {
95
101
  className: `${e.prefixCls}-list-cancel-icon`,
@@ -105,20 +111,20 @@ const $ = {
105
111
  (a = e.onAbort) == null || a.call(e, m);
106
112
  }
107
113
  }),
108
- children: e.cancelIcon || /* @__PURE__ */ n(re, { content: (b = i == null ? void 0 : i.Upload) == null ? void 0 : b.cancel, children: /* @__PURE__ */ n(Ee, {}) })
114
+ children: e.cancelIcon || /* @__PURE__ */ n(re, { content: (v = i == null ? void 0 : i.Upload) == null ? void 0 : v.cancel, children: /* @__PURE__ */ n(Ee, {}) })
109
115
  }
110
116
  )
111
117
  ] })
112
118
  ] });
113
- return k(r) ? r(m, U) : U;
114
- }, He = (e, u) => {
115
- const { disabled: m, prefixCls: s, file: t, showUploadList: r, locale: i } = e, o = Y(), h = `${s}-list-item-picture`, { status: v, originFile: I } = t, [U, w] = A(t.url), f = _(r) ? r : {};
119
+ return k(r) ? r(m, x) : x;
120
+ }, Ve = (e, u) => {
121
+ const { disabled: m, prefixCls: s, file: t, showUploadList: r, locale: i } = e, l = Y(), h = `${s}-list-item-picture`, { status: b, originFile: U } = t, [x, w] = A(t.url), f = _(r) ? r : {};
116
122
  return G(() => {
117
123
  if (t.url !== void 0)
118
124
  w(t.url);
119
125
  else {
120
- const l = t.originFile;
121
- l && be(l).then((c) => {
126
+ const o = t.originFile;
127
+ o && he(o).then((c) => {
122
128
  w(c);
123
129
  }).catch((c) => {
124
130
  console.error(c);
@@ -128,13 +134,13 @@ const $ = {
128
134
  return () => {
129
135
  };
130
136
  }, [t.url, t.originFile]), G(() => {
131
- var l;
132
- return (l = e.onChange) == null || l.call(e, { type: "url", data: U }), () => {
137
+ var o;
138
+ return (o = e.onChange) == null || o.call(e, { type: "url", data: x }), () => {
133
139
  var c;
134
140
  (c = e.onChange) == null || c.call(e, { type: "url", data: void 0 });
135
141
  };
136
- }, [U]), /* @__PURE__ */ n("div", { className: h, ref: u, children: v === $.uploading ? /* @__PURE__ */ n(
137
- ve,
142
+ }, [x]), /* @__PURE__ */ n("div", { className: h, ref: u, children: b === I.uploading ? /* @__PURE__ */ n(
143
+ be,
138
144
  {
139
145
  onReupload: e.onReupload,
140
146
  onUpload: e.onUpload,
@@ -146,45 +152,45 @@ const $ = {
146
152
  ...f
147
153
  }
148
154
  ) : /* @__PURE__ */ F(M, { children: [
149
- k(f.imageRender) ? f.imageRender(t) : /* @__PURE__ */ n("img", { src: U, alt: t.name }),
155
+ k(f.imageRender) ? f.imageRender(t) : /* @__PURE__ */ n("img", { src: x, alt: t.name }),
150
156
  /* @__PURE__ */ F("div", { className: `${h}-mask`, role: "radiogroup", children: [
151
- t.status === $.fail && /* @__PURE__ */ n("div", { className: `${h}-error-tip`, children: f.errorIcon !== null && /* @__PURE__ */ n("span", { className: `${s}-list-error-icon`, children: f.errorIcon || /* @__PURE__ */ n(Ne, {}) }) }),
157
+ t.status === I.fail && /* @__PURE__ */ n("div", { className: `${h}-error-tip`, children: f.errorIcon !== null && /* @__PURE__ */ n("span", { className: `${s}-list-error-icon`, children: f.errorIcon || /* @__PURE__ */ n(Ne, {}) }) }),
152
158
  /* @__PURE__ */ F("div", { className: `${h}-operation`, children: [
153
- t.status !== $.fail && f.previewIcon !== null && /* @__PURE__ */ n(
159
+ t.status !== I.fail && f.previewIcon !== null && /* @__PURE__ */ n(
154
160
  "span",
155
161
  {
156
162
  className: `${s}-list-preview-icon`,
157
163
  tabIndex: 0,
158
164
  role: "button",
159
165
  "aria-label": i.Upload.preview,
160
- ...o({
166
+ ...l({
161
167
  onPressEnter: () => {
162
- var l;
163
- (l = e.onPreview) == null || l.call(e, t);
168
+ var o;
169
+ (o = e.onPreview) == null || o.call(e, t);
164
170
  }
165
171
  }),
166
172
  onClick: () => {
167
- var l;
168
- (l = e.onPreview) == null || l.call(e, t);
173
+ var o;
174
+ (o = e.onPreview) == null || o.call(e, t);
169
175
  },
170
176
  children: f.previewIcon || /* @__PURE__ */ n(Ce, {})
171
177
  }
172
178
  ),
173
- t.status === $.fail && f.reuploadIcon !== null && /* @__PURE__ */ n(
179
+ t.status === I.fail && f.reuploadIcon !== null && /* @__PURE__ */ n(
174
180
  "span",
175
181
  {
176
182
  className: `${e.prefixCls}-list-reupload-icon`,
177
183
  onClick: () => {
178
- var l;
179
- (l = e.onReupload) == null || l.call(e, t);
184
+ var o;
185
+ (o = e.onReupload) == null || o.call(e, t);
180
186
  },
181
187
  tabIndex: 0,
182
188
  role: "button",
183
189
  "aria-label": i.Upload.reupload,
184
- ...o({
190
+ ...l({
185
191
  onPressEnter: () => {
186
- var l;
187
- (l = e.onReupload) == null || l.call(e, t);
192
+ var o;
193
+ (o = e.onReupload) == null || o.call(e, t);
188
194
  }
189
195
  }),
190
196
  children: f.reuploadIcon || /* @__PURE__ */ n(ae, {})
@@ -195,16 +201,16 @@ const $ = {
195
201
  {
196
202
  className: `${s}-list-remove-icon`,
197
203
  onClick: () => {
198
- var l;
199
- (l = e.onRemove) == null || l.call(e, t);
204
+ var o;
205
+ (o = e.onRemove) == null || o.call(e, t);
200
206
  },
201
207
  role: "button",
202
208
  "aria-label": i.Upload.delete,
203
209
  tabIndex: 0,
204
- ...o({
210
+ ...l({
205
211
  onPressEnter: () => {
206
- var l;
207
- (l = e.onRemove) == null || l.call(e, t);
212
+ var o;
213
+ (o = e.onRemove) == null || o.call(e, t);
208
214
  }
209
215
  }),
210
216
  children: f.removeIcon || /* @__PURE__ */ n(ge, {})
@@ -213,7 +219,7 @@ const $ = {
213
219
  ] })
214
220
  ] })
215
221
  ] }) });
216
- }, Ve = Q(He), Ge = (e) => {
222
+ }, He = Q(Ve), Ge = (e) => {
217
223
  let u = "";
218
224
  if (e.originFile && e.originFile.type)
219
225
  u = e.originFile.type;
@@ -221,18 +227,18 @@ const $ = {
221
227
  const s = (e.name || "").split(".").pop() || "";
222
228
  u = s, ["png", "jpg", "jpeg", "bmp", "gif"].indexOf(s) > -1 ? u = "image" : ["mp4", "m2v", "mkv"].indexOf(s) > -1 ? u = "video" : ["mp3", "wav", "wmv"].indexOf(s) > -1 && (u = "audio");
223
229
  }
224
- return u.indexOf("image") > -1 ? he : u.indexOf("pdf") > -1 ? Le : u.indexOf("audio") > -1 ? Re : u.indexOf("video") > -1 ? De : Se;
230
+ return u.indexOf("image") > -1 ? ve : u.indexOf("pdf") > -1 ? ke : u.indexOf("audio") > -1 ? Oe : u.indexOf("video") > -1 ? Se : Te;
225
231
  }, _e = (e, u) => {
226
- const { prefixCls: m, disabled: s, file: t, locale: r } = e, i = `${m}-list-item-text`, o = Y(), h = Ge(t), v = _(e.showUploadList) ? e.showUploadList : {}, I = _(v) ? v : {}, U = t.name || t.originFile && t.originFile.name, [w, f] = A(t.url);
227
- let l = {};
228
- return t.status !== $.fail && (l = {
232
+ const { prefixCls: m, disabled: s, file: t, locale: r } = e, i = `${m}-list-item-text`, l = Y(), h = Ge(t), b = _(e.showUploadList) ? e.showUploadList : {}, U = _(b) ? b : {}, x = t.name || t.originFile && t.originFile.name, [w, f] = A(t.url);
233
+ let o = {};
234
+ return t.status !== I.fail && (o = {
229
235
  popupVisible: !1
230
236
  }), G(() => {
231
237
  if (t.url !== void 0)
232
238
  f(t.url);
233
239
  else {
234
240
  const c = t.originFile;
235
- c && be(c).then((g) => {
241
+ c && he(c).then((g) => {
236
242
  f(g);
237
243
  }).catch((g) => {
238
244
  console.error(g);
@@ -254,32 +260,32 @@ const $ = {
254
260
  ref: u,
255
261
  children: [
256
262
  /* @__PURE__ */ F("div", { className: i, children: [
257
- e.listType === "picture-list" && /* @__PURE__ */ n("div", { className: `${i}-thumbnail`, children: k(v.imageRender) ? v.imageRender(t) : /* @__PURE__ */ n("img", { src: w }) }),
263
+ e.listType === "picture-list" && /* @__PURE__ */ n("div", { className: `${i}-thumbnail`, children: k(b.imageRender) ? b.imageRender(t) : /* @__PURE__ */ n("img", { src: w }) }),
258
264
  /* @__PURE__ */ F("div", { className: `${i}-content`, children: [
259
265
  /* @__PURE__ */ F("div", { className: `${i}-name`, children: [
260
- e.listType === "text" && I.fileIcon !== null && /* @__PURE__ */ n("span", { className: `${m}-list-file-icon`, children: I.fileIcon || /* @__PURE__ */ n(h, {}) }),
261
- k(v.fileName) ? /* @__PURE__ */ n("span", { className: `${i}-name-text`, children: v.fileName(t) }) : t.url ? /* @__PURE__ */ n(
266
+ e.listType === "text" && U.fileIcon !== null && /* @__PURE__ */ n("span", { className: `${m}-list-file-icon`, children: U.fileIcon || /* @__PURE__ */ n(h, {}) }),
267
+ k(b.fileName) ? /* @__PURE__ */ n("span", { className: `${i}-name-text`, children: b.fileName(t) }) : t.url ? /* @__PURE__ */ n(
262
268
  "a",
263
269
  {
264
270
  href: t.url,
265
271
  target: "_blank",
266
272
  rel: "noreferrer",
267
273
  className: `${i}-name-link`,
268
- children: U
274
+ children: x
269
275
  }
270
- ) : /* @__PURE__ */ n("span", { className: `${i}-name-text`, children: U }),
271
- t.status === $.fail && I.errorIcon !== null && /* @__PURE__ */ n(
276
+ ) : /* @__PURE__ */ n("span", { className: `${i}-name-text`, children: x }),
277
+ t.status === I.fail && U.errorIcon !== null && /* @__PURE__ */ n(
272
278
  re,
273
279
  {
274
- content: (typeof t.response == "object" ? Ie(t.response) && t.response : t.response) || r.Upload.error,
275
- ...l,
276
- disabled: t.status !== $.fail,
277
- children: /* @__PURE__ */ n("span", { className: `${e.prefixCls}-list-error-icon`, children: I.errorIcon || (e.listType === "picture-card" ? /* @__PURE__ */ n(he, {}) : /* @__PURE__ */ n(ke, {})) })
280
+ content: (typeof t.response == "object" ? Ue(t.response) && t.response : t.response) || r.Upload.error,
281
+ ...o,
282
+ disabled: t.status !== I.fail,
283
+ children: /* @__PURE__ */ n("span", { className: `${e.prefixCls}-list-error-icon`, children: U.errorIcon || (e.listType === "picture-card" ? /* @__PURE__ */ n(ve, {}) : /* @__PURE__ */ n(De, {})) })
278
284
  }
279
285
  )
280
286
  ] }),
281
287
  /* @__PURE__ */ n(
282
- ve,
288
+ be,
283
289
  {
284
290
  file: t,
285
291
  prefixCls: m,
@@ -287,13 +293,13 @@ const $ = {
287
293
  onReupload: e.onReupload,
288
294
  onUpload: e.onUpload,
289
295
  onAbort: e.onAbort,
290
- ...I
296
+ ...U
291
297
  }
292
298
  )
293
299
  ] })
294
300
  ] }),
295
- /* @__PURE__ */ n("div", { className: `${m}-list-item-operation`, children: !s && I.removeIcon !== null && /* @__PURE__ */ n(
296
- Ue,
301
+ /* @__PURE__ */ n("div", { className: `${m}-list-item-operation`, children: !s && U.removeIcon !== null && /* @__PURE__ */ n(
302
+ xe,
297
303
  {
298
304
  className: `${m}-list-remove-icon-hover`,
299
305
  onClick: () => {
@@ -302,13 +308,13 @@ const $ = {
302
308
  },
303
309
  tabIndex: 0,
304
310
  "aria-label": r.Upload.delete,
305
- ...o({
311
+ ...l({
306
312
  onPressEnter: () => {
307
313
  var c;
308
314
  (c = e.onRemove) == null || c.call(e, t);
309
315
  }
310
316
  }),
311
- children: /* @__PURE__ */ n("span", { className: `${m}-list-remove-icon`, children: I.removeIcon || /* @__PURE__ */ n(ge, {}) })
317
+ children: /* @__PURE__ */ n("span", { className: `${m}-list-remove-icon`, children: U.removeIcon || /* @__PURE__ */ n(ge, {}) })
312
318
  }
313
319
  ) })
314
320
  ]
@@ -320,16 +326,16 @@ const $ = {
320
326
  fileList: t,
321
327
  renderUploadList: r,
322
328
  renderUploadItem: i,
323
- prefixCls: o,
329
+ prefixCls: l,
324
330
  ...h
325
- } = e, [v, I] = A(-1), [U, w] = A([]);
331
+ } = e, [b, U] = A(-1), [x, w] = A([]);
326
332
  if (k(r))
327
- return /* @__PURE__ */ n("div", { className: `${o}-list`, children: r(t, h) });
333
+ return /* @__PURE__ */ n("div", { className: `${l}-list`, children: r(t, h) });
328
334
  const f = (c) => {
329
- e.imagePreview && I(c);
335
+ e.imagePreview && U(c);
330
336
  };
331
- function l(c, g, b) {
332
- (c == null ? void 0 : c.type) === "url" && [$.init, $.success].indexOf(b.status) > -1 && w((a) => {
337
+ function o(c, g, v) {
338
+ (c == null ? void 0 : c.type) === "url" && [I.init, I.success].indexOf(v.status) > -1 && w((a) => {
333
339
  const E = [...a];
334
340
  return E[g] = c.data, E.filter(Boolean);
335
341
  });
@@ -340,19 +346,19 @@ const $ = {
340
346
  we,
341
347
  {
342
348
  className: X(
343
- `${o}-list`,
344
- `${o}-list-type-${s}`,
349
+ `${l}-list`,
350
+ `${l}-list-type-${s}`,
345
351
  {
346
- [`${o}-list-rtl`]: m
352
+ [`${l}-list-rtl`]: m
347
353
  }
348
354
  ),
349
355
  children: t.map((c, g) => {
350
- let b = s === "picture-card" ? /* @__PURE__ */ n(
356
+ let v = s === "picture-card" ? /* @__PURE__ */ n(
351
357
  "div",
352
358
  {
353
- className: `${o}-list-item ${o}-list-item-${c.status}`,
359
+ className: `${l}-list-item ${l}-list-item-${c.status}`,
354
360
  children: /* @__PURE__ */ n(
355
- Ve,
361
+ He,
356
362
  {
357
363
  ...e,
358
364
  onPreview: (a) => {
@@ -362,7 +368,7 @@ const $ = {
362
368
  file: c,
363
369
  locale: u,
364
370
  onChange: (a) => {
365
- l(a, g, c);
371
+ o(a, g, c);
366
372
  }
367
373
  }
368
374
  )
@@ -374,15 +380,15 @@ const $ = {
374
380
  file: c,
375
381
  locale: u,
376
382
  onChange: (a) => {
377
- l(a, g, c);
383
+ o(a, g, c);
378
384
  }
379
385
  }
380
386
  );
381
- return k(i) && (b = i(b, c, t)), s === "picture-card" ? /* @__PURE__ */ n(
387
+ return k(i) && (v = i(v, c, t)), s === "picture-card" ? /* @__PURE__ */ n(
382
388
  ne,
383
389
  {
384
390
  timeout: { enter: 200, exit: 400 },
385
- classNames: `${o}-slide-inline`,
391
+ classNames: `${l}-slide-inline`,
386
392
  onEntered: (a) => {
387
393
  a && (a.style.width = "");
388
394
  },
@@ -395,14 +401,14 @@ const $ = {
395
401
  onExited: (a) => {
396
402
  a && (a.style.width = 0);
397
403
  },
398
- children: b
404
+ children: v
399
405
  },
400
406
  c.uid
401
407
  ) : /* @__PURE__ */ n(
402
408
  ne,
403
409
  {
404
410
  timeout: { enter: 200, exit: 400 },
405
- classNames: `${o}-slide-up`,
411
+ classNames: `${l}-slide-up`,
406
412
  onExit: (a) => {
407
413
  a && (a.style.height = `${a.scrollHeight}px`);
408
414
  },
@@ -412,7 +418,7 @@ const $ = {
412
418
  onExited: (a) => {
413
419
  a && (a.style.height = 0);
414
420
  },
415
- children: b
421
+ children: v
416
422
  },
417
423
  c.uid
418
424
  );
@@ -422,31 +428,31 @@ const $ = {
422
428
  s === "picture-card" && e.imagePreview && /* @__PURE__ */ n(
423
429
  Pe,
424
430
  {
425
- srcList: U,
426
- visible: v !== -1,
427
- current: v,
431
+ srcList: x,
432
+ visible: b !== -1,
433
+ current: b,
428
434
  onChange: f,
429
435
  onVisibleChange: (c) => {
430
- f(c ? v : -1);
436
+ f(c ? b : -1);
431
437
  }
432
438
  }
433
439
  )
434
440
  ] });
435
441
  };
436
442
  ye.displayName = "FileList";
437
- const le = (e, u) => {
443
+ const oe = (e, u) => {
438
444
  const m = _(u) ? u == null ? void 0 : u.type : u;
439
445
  if (!(_(u) && u.strict === !1) && m && e) {
440
446
  const t = Ae(m) ? m : m.split(",").map((i) => i.trim()).filter((i) => i), r = (e.name.indexOf(".") > -1 ? `.${e.name.split(".").pop()}` : "").toLowerCase();
441
447
  return t.some((i) => {
442
- const o = i && i.toLowerCase(), h = (e.type || "").toLowerCase(), v = h.split("/")[0];
443
- if (o === h || `${v}${r.replace(".", "/")}` === o || /^\*(\/\*)?$/.test(o))
448
+ const l = i && i.toLowerCase(), h = (e.type || "").toLowerCase(), b = h.split("/")[0];
449
+ if (l === h || `${b}${r.replace(".", "/")}` === l || /^\*(\/\*)?$/.test(l))
444
450
  return !0;
445
- if (/\/\*/.test(o))
446
- return h.replace(/\/.*$/, "") === o.replace(/\/.*$/, "");
447
- if (/\..*/.test(o)) {
448
- let I = [o];
449
- return (o === ".jpg" || o === ".jpeg") && (I = [".jpg", ".jpeg"]), I.indexOf(r) > -1;
451
+ if (/\/\*/.test(l))
452
+ return h.replace(/\/.*$/, "") === l.replace(/\/.*$/, "");
453
+ if (/\..*/.test(l)) {
454
+ let U = [l];
455
+ return (l === ".jpg" || l === ".jpeg") && (U = [".jpg", ".jpeg"]), U.indexOf(r) > -1;
450
456
  }
451
457
  return !1;
452
458
  });
@@ -456,7 +462,7 @@ const le = (e, u) => {
456
462
  if (!e)
457
463
  return;
458
464
  let m = [].slice.call(e);
459
- return u && (m = m.filter((s) => le(s, u))), m;
465
+ return u && (m = m.filter((s) => oe(s, u))), m;
460
466
  }, Me = (e, u, m) => {
461
467
  const s = [];
462
468
  let t = 0;
@@ -464,22 +470,22 @@ const le = (e, u) => {
464
470
  !t && m(s);
465
471
  }, i = (h) => {
466
472
  if (t += 1, h != null && h.isFile) {
467
- h.file((v) => {
468
- t -= 1, le(v, u) && (Object.defineProperty(v, "webkitRelativePath", {
473
+ h.file((b) => {
474
+ t -= 1, oe(b, u) && (Object.defineProperty(b, "webkitRelativePath", {
469
475
  value: h.fullPath.replace(/^\//, "")
470
- }), s.push(v)), r();
476
+ }), s.push(b)), r();
471
477
  });
472
478
  return;
473
479
  }
474
480
  if (h != null && h.isDirectory) {
475
- const v = h.createReader();
476
- let I = !1;
477
- const U = () => {
478
- v.readEntries((w) => {
479
- I || (t -= 1, I = !0), w.length === 0 ? r() : (U(), w.forEach(i));
481
+ const b = h.createReader();
482
+ let U = !1;
483
+ const x = () => {
484
+ b.readEntries((w) => {
485
+ U || (t -= 1, U = !0), w.length === 0 ? r() : (x(), w.forEach(i));
480
486
  });
481
487
  };
482
- U();
488
+ x();
483
489
  return;
484
490
  }
485
491
  t -= 1, r();
@@ -488,68 +494,68 @@ const le = (e, u) => {
488
494
  h.webkitGetAsEntry && i(h.webkitGetAsEntry());
489
495
  });
490
496
  }, ze = (e, u) => {
491
- const m = Y(), { locale: s } = z(W), [t, r] = A(!1), [i, o] = A(0), {
497
+ const m = Y(), { locale: s } = z(W), [t, r] = A(!1), [i, l] = A(0), {
492
498
  tip: h,
493
- children: v,
494
- disabled: I,
495
- drag: U,
499
+ children: b,
500
+ disabled: U,
501
+ drag: x,
496
502
  listType: w,
497
503
  prefixCls: f,
498
- accept: l,
504
+ accept: o,
499
505
  multiple: c
500
506
  } = e, g = {
501
- disabled: I
507
+ disabled: U
502
508
  };
503
509
  return G(() => {
504
- o(0);
505
- }, [t]), v === null ? null : /* @__PURE__ */ n(
510
+ l(0);
511
+ }, [t]), b === null ? null : /* @__PURE__ */ n(
506
512
  "div",
507
513
  {
508
514
  className: `${f}-trigger`,
509
- onClick: I ? void 0 : e.onClick,
515
+ onClick: U ? void 0 : e.onClick,
510
516
  ...m({
511
517
  onPressEnter: () => {
512
- var b;
513
- !I && ((b = e.onClick) == null || b.call(e));
518
+ var v;
519
+ !U && ((v = e.onClick) == null || v.call(e));
514
520
  }
515
521
  }),
516
522
  ref: u,
517
523
  onDragEnter: () => {
518
- o(i + 1);
524
+ l(i + 1);
519
525
  },
520
- onDragLeave: (b) => {
526
+ onDragLeave: (v) => {
521
527
  var a;
522
- b.preventDefault(), i === 0 ? (r(!1), !I && ((a = e.onDragLeave) == null || a.call(e, b))) : o(i - 1);
528
+ v.preventDefault(), i === 0 ? (r(!1), !U && ((a = e.onDragLeave) == null || a.call(e, v))) : l(i - 1);
523
529
  },
524
- onDrop: (b) => {
530
+ onDrop: (v) => {
525
531
  var a, E;
526
- if (b.preventDefault(), !I && e.drag !== !1) {
532
+ if (v.preventDefault(), !U && e.drag !== !1) {
527
533
  if (r(!1), e.directory)
528
- Me(b.dataTransfer.items, l, (S) => {
534
+ Me(v.dataTransfer.items, o, (S) => {
529
535
  var T;
530
536
  (T = e.onDragFiles) == null || T.call(e, S);
531
537
  });
532
538
  else {
533
- const S = [].slice.call(b.dataTransfer.items || []).reduce((H, j, B) => {
539
+ const S = [].slice.call(v.dataTransfer.items || []).reduce((V, j, B) => {
534
540
  if (j.webkitGetAsEntry) {
535
541
  const d = j.webkitGetAsEntry();
536
- return d != null && d.isDirectory ? [...H, B] : H;
542
+ return d != null && d.isDirectory ? [...V, B] : V;
537
543
  }
538
- }, []), T = [].slice.call(b.dataTransfer.files || []).filter((H, j) => !S.includes(j)), q = Ke(T, l);
544
+ }, []), T = [].slice.call(v.dataTransfer.files || []).filter((V, j) => !S.includes(j)), q = Ke(T, o);
539
545
  q.length > 0 && ((a = e.onDragFiles) == null || a.call(e, c ? q : q.slice(0, 1)));
540
546
  }
541
- (E = e.onDrop) == null || E.call(e, b);
547
+ (E = e.onDrop) == null || E.call(e, v);
542
548
  }
543
549
  },
544
- onDragOver: (b) => {
550
+ onDragOver: (v) => {
545
551
  var a;
546
- b.preventDefault(), !I && !t && (r(!0), (a = e.onDragOver) == null || a.call(e, b));
552
+ v.preventDefault(), !U && !t && (r(!0), (a = e.onDragOver) == null || a.call(e, v));
547
553
  },
548
- children: te.isValidElement(v) ? /* @__PURE__ */ n(
554
+ children: te.isValidElement(b) ? /* @__PURE__ */ n(
549
555
  "div",
550
556
  {
551
557
  className: X({ [`${f}-trigger-custom-active`]: t }),
552
- children: te.cloneElement(v, g)
558
+ children: te.cloneElement(b, g)
553
559
  }
554
560
  ) : w === "picture-card" ? /* @__PURE__ */ n("div", { className: `${f}-trigger-picture-wrapper`, children: /* @__PURE__ */ n(
555
561
  "div",
@@ -559,7 +565,7 @@ const le = (e, u) => {
559
565
  "aria-label": s.Upload.upload,
560
566
  children: /* @__PURE__ */ n("div", { className: `${f}-trigger-picture-text`, children: e.triggerPictureIcon ?? /* @__PURE__ */ n(de, {}) })
561
567
  }
562
- ) }) : U ? /* @__PURE__ */ F(
568
+ ) }) : x ? /* @__PURE__ */ F(
563
569
  "div",
564
570
  {
565
571
  className: X(`${f}-trigger-drag`, {
@@ -609,32 +615,32 @@ const Je = function(e) {
609
615
  action: t,
610
616
  method: r,
611
617
  headers: i = {},
612
- name: o,
618
+ name: l,
613
619
  file: h,
614
- data: v = {},
615
- withCredentials: I = !1
620
+ data: b = {},
621
+ withCredentials: U = !1
616
622
  } = e;
617
- function U(g) {
623
+ function x(g) {
618
624
  return typeof g == "function" ? g(h) : g;
619
625
  }
620
- const w = U(o), f = U(v), l = new XMLHttpRequest();
621
- u && l.upload && (l.upload.onprogress = function(g) {
622
- let b;
623
- g.total > 0 && (b = g.loaded / g.total * 100), u(parseInt(b, 10), g);
624
- }), l.onerror = function(b) {
625
- m(b);
626
- }, l.onload = function() {
627
- if (l.status < 200 || l.status >= 300)
628
- return m(ue(l));
629
- s(ue(l));
626
+ const w = x(l), f = x(b), o = new XMLHttpRequest();
627
+ u && o.upload && (o.upload.onprogress = function(g) {
628
+ let v;
629
+ g.total > 0 && (v = g.loaded / g.total * 100), u(parseInt(v, 10), g);
630
+ }), o.onerror = function(v) {
631
+ m(v);
632
+ }, o.onload = function() {
633
+ if (o.status < 200 || o.status >= 300)
634
+ return m(ue(o));
635
+ s(ue(o));
630
636
  };
631
637
  const c = new FormData();
632
- f && Object.keys(f).map((g) => c.append(g, f[g])), c.append(w || "file", h), l.open(r, t, !0), I && "withCredentials" in l && (l.withCredentials = !0);
638
+ f && Object.keys(f).map((g) => c.append(g, f[g])), c.append(w || "file", h), o.open(r, t, !0), U && "withCredentials" in o && (o.withCredentials = !0);
633
639
  for (const g in i)
634
- Object.prototype.hasOwnProperty.call(i, g) && i[g] !== null && l.setRequestHeader(g, i[g]);
635
- return l.send(c), {
640
+ Object.prototype.hasOwnProperty.call(i, g) && i[g] !== null && o.setRequestHeader(g, i[g]);
641
+ return o.send(c), {
636
642
  abort() {
637
- l.abort();
643
+ o.abort();
638
644
  }
639
645
  };
640
646
  };
@@ -642,70 +648,70 @@ function Xe(e, u) {
642
648
  z(W);
643
649
  const m = ie(null), [s, t] = A({ uploadRequests: {} });
644
650
  function r(d) {
645
- U(d);
651
+ x(d);
646
652
  }
647
653
  function i(d) {
648
654
  var N;
649
- const x = s.uploadRequests[d.uid];
650
- x && ((N = x.abort) == null || N.call(x), v({
655
+ const $ = s.uploadRequests[d.uid];
656
+ $ && ((N = $.abort) == null || N.call($), b({
651
657
  ...d,
652
- status: $.fail
658
+ status: I.fail
653
659
  }), h(d.uid));
654
660
  }
655
- function o(d) {
656
- U({
661
+ function l(d) {
662
+ x({
657
663
  ...d,
658
664
  percent: 0,
659
- status: $.uploading
665
+ status: I.uploading
660
666
  });
661
667
  }
662
668
  function h(d) {
663
- const x = { ...s.uploadRequests };
664
- delete x[d], t({
665
- uploadRequests: x
669
+ const $ = { ...s.uploadRequests };
670
+ delete $[d], t({
671
+ uploadRequests: $
666
672
  });
667
673
  }
668
674
  fe(u, () => ({
669
675
  // 提供 ref 调用
670
676
  upload: r,
671
677
  abort: i,
672
- reupload: o,
678
+ reupload: l,
673
679
  // 删除上传(手动上传时,文件会出现在上传列表,但属于init状态)
674
680
  delete: h
675
681
  }));
676
- function v(d, x = e.fileList) {
682
+ function b(d, $ = e.fileList) {
677
683
  const { onFileStatusChange: N } = e, L = "uid" in d ? "uid" : "name";
678
684
  N == null || N(
679
- x.map((y) => y[L] === d[L] ? d : y),
685
+ $.map((y) => y[L] === d[L] ? d : y),
680
686
  d
681
687
  );
682
688
  }
683
- function I(d) {
684
- const x = "uid" in d ? "uid" : "name";
685
- return e.fileList.find((L) => L[x] === d[x]);
689
+ function U(d) {
690
+ const $ = "uid" in d ? "uid" : "name";
691
+ return e.fileList.find((L) => L[$] === d[$]);
686
692
  }
687
- async function U(d) {
693
+ async function x(d) {
688
694
  const {
689
- action: x,
695
+ action: $,
690
696
  headers: N,
691
697
  name: L,
692
698
  data: y,
693
699
  withCredentials: C,
694
700
  customRequest: P,
695
701
  method: R
696
- } = e, oe = {
702
+ } = e, le = {
697
703
  onProgress: (K, D) => {
698
704
  var se;
699
- const J = I(d);
700
- J && (J.status = $.uploading, J.percent = K, (se = e == null ? void 0 : e.onProgress) == null || se.call(e, J, D));
705
+ const J = U(d);
706
+ J && (J.status = I.uploading, J.percent = K, (se = e == null ? void 0 : e.onProgress) == null || se.call(e, J, D));
701
707
  },
702
708
  onSuccess: (K) => {
703
- const D = I(d);
704
- D && (D.status = $.success, D.response = K, v(D)), h(d.uid);
709
+ const D = U(d);
710
+ D && (D.status = I.success, D.response = K, b(D)), h(d.uid);
705
711
  },
706
712
  onError: (K) => {
707
- const D = I(d);
708
- D && (D.status = $.fail, D.response = K, v(D)), h(d.uid);
713
+ const D = U(d);
714
+ D && (D.status = I.fail, D.response = K, b(D)), h(d.uid);
709
715
  },
710
716
  headers: N,
711
717
  name: L,
@@ -713,9 +719,9 @@ function Xe(e, u) {
713
719
  data: y,
714
720
  withCredentials: C
715
721
  };
716
- v(d);
722
+ b(d);
717
723
  let Z;
718
- P ? Z = await P(oe) : x && (Z = Je({ ...oe, action: x, method: R })), t({
724
+ P ? Z = await P(le) : $ && (Z = Je({ ...le, action: $, method: R })), t({
719
725
  uploadRequests: {
720
726
  ...s.uploadRequests,
721
727
  [d.uid]: Z
@@ -723,29 +729,29 @@ function Xe(e, u) {
723
729
  });
724
730
  }
725
731
  function w(d) {
726
- const { limit: x, fileList: N, onExceedLimit: L, autoUpload: y } = e;
727
- if (me(x) && x < N.length + d.length)
732
+ const { limit: $, fileList: N, onExceedLimit: L, autoUpload: y } = e;
733
+ if (me($) && $ < N.length + d.length)
728
734
  return L == null ? void 0 : L(d, N);
729
735
  const C = (P, R) => {
730
- const O = e.fileList || [], V = {
736
+ const O = e.fileList || [], H = {
731
737
  uid: `${String(+/* @__PURE__ */ new Date())}${R}`,
732
738
  originFile: P,
733
739
  percent: 0,
734
- status: $.init,
740
+ status: I.init,
735
741
  name: P.name
736
742
  };
737
- v(V), O.push(V), v(V, O), y && setTimeout(() => {
738
- U({
739
- ...V,
740
- status: $.uploading
743
+ b(H), O.push(H), b(H, O), y && setTimeout(() => {
744
+ x({
745
+ ...H,
746
+ status: I.uploading
741
747
  });
742
748
  }, 0);
743
749
  };
744
750
  d.forEach((P, R) => {
745
- le(P, e.accept) && (k(e.beforeUpload) ? Promise.resolve(e.beforeUpload(P, d)).then((O) => {
751
+ oe(P, e.accept) && (k(e.beforeUpload) ? Promise.resolve(e.beforeUpload(P, d)).then((O) => {
746
752
  if (O !== !1) {
747
- const V = qe(O) ? O : P;
748
- C(V, R);
753
+ const H = qe(O) ? O : P;
754
+ C(H, R);
749
755
  }
750
756
  }).catch((O) => {
751
757
  console.error(O);
@@ -754,16 +760,16 @@ function Xe(e, u) {
754
760
  }
755
761
  const {
756
762
  accept: f,
757
- multiple: l,
763
+ multiple: o,
758
764
  children: c,
759
765
  prefixCls: g,
760
- tip: b,
766
+ tip: v,
761
767
  disabled: a,
762
768
  drag: E,
763
769
  listType: S,
764
770
  hide: T,
765
771
  directory: q,
766
- onDrop: H,
772
+ onDrop: V,
767
773
  onDragOver: j,
768
774
  onDragLeave: B
769
775
  } = e;
@@ -782,11 +788,11 @@ function Xe(e, u) {
782
788
  },
783
789
  type: "file",
784
790
  accept: _(f) ? f == null ? void 0 : f.type : f,
785
- multiple: l,
791
+ multiple: o,
786
792
  ...q ? { webkitdirectory: "true" } : {},
787
793
  onChange: (d) => {
788
- const x = d.target.files;
789
- x && (w([].slice.call(x)), m.current.value = "");
794
+ const $ = d.target.files;
795
+ $ && (w([].slice.call($)), m.current.value = "");
790
796
  },
791
797
  onClick: (d) => {
792
798
  d.stopPropagation();
@@ -805,20 +811,20 @@ function Xe(e, u) {
805
811
  We,
806
812
  {
807
813
  directory: q,
808
- tip: b,
809
- multiple: l,
814
+ tip: v,
815
+ multiple: o,
810
816
  accept: f,
811
817
  disabled: a,
812
818
  drag: E,
813
819
  listType: S,
814
820
  triggerPictureIcon: e.triggerPictureIcon,
815
- onDrop: H,
821
+ onDrop: V,
816
822
  onDragOver: j,
817
823
  onDragLeave: B,
818
824
  onDragFiles: w,
819
825
  onClick: () => {
820
- var d, x;
821
- !a && ((x = (d = m.current) == null ? void 0 : d.click) == null || x.call(d));
826
+ var d, $;
827
+ !a && (($ = (d = m.current) == null ? void 0 : d.click) == null || $.call(d));
822
828
  },
823
829
  prefixCls: g,
824
830
  children: k(c) ? c({ fileList: e.fileList }) : c
@@ -827,7 +833,7 @@ function Xe(e, u) {
827
833
  },
828
834
  "trigger-node"
829
835
  ),
830
- b && S !== "picture-card" && !E ? /* @__PURE__ */ n("div", { className: `${g}-trigger-tip`, children: b }, "trigger-tip") : null
836
+ v && S !== "picture-card" && !E ? /* @__PURE__ */ n("div", { className: `${g}-trigger-tip`, children: v }, "trigger-tip") : null
831
837
  ] });
832
838
  }
833
839
  const Qe = te.forwardRef(Xe), ee = function(e) {
@@ -835,11 +841,11 @@ const Qe = te.forwardRef(Xe), ee = function(e) {
835
841
  return u.reduce((m, s, t) => {
836
842
  if (s.uid) {
837
843
  const r = u.findIndex(
838
- (o) => s.uid === o.uid && s !== o
844
+ (l) => s.uid === l.uid && s !== l
839
845
  );
840
846
  ce(r !== -1, "[Upload]: duplicate uid");
841
847
  const i = {
842
- status: $.success,
848
+ status: I.success,
843
849
  percent: 100,
844
850
  ...s
845
851
  };
@@ -849,7 +855,7 @@ const Qe = te.forwardRef(Xe), ee = function(e) {
849
855
  const r = `${String(+/* @__PURE__ */ new Date())}${t}`;
850
856
  m.push({
851
857
  uid: r,
852
- status: $.success,
858
+ status: I.success,
853
859
  percent: 100,
854
860
  ...s
855
861
  });
@@ -863,28 +869,28 @@ const Qe = te.forwardRef(Xe), ee = function(e) {
863
869
  beforeUpload: () => !0,
864
870
  method: "post"
865
871
  }, Ze = (e, u) => {
866
- const { getPrefixCls: m, componentConfig: s, rtl: t } = z(W), r = xe(
872
+ const { getPrefixCls: m, componentConfig: s, rtl: t } = z(W), r = $e(
867
873
  e,
868
874
  Ye,
869
875
  s == null ? void 0 : s.Upload
870
- ), i = m("upload"), o = ie(), h = ie(), [v, I] = A(() => "fileList" in r ? ee(r.fileList) : "defaultFileList" in r ? ee(r.defaultFileList) : []), U = "fileList" in r ? ee(r.fileList) : v, w = (y, C) => {
876
+ ), i = m("upload"), l = ie(), h = ie(), [b, U] = A(() => "fileList" in r ? ee(r.fileList) : "defaultFileList" in r ? ee(r.defaultFileList) : []), x = "fileList" in r ? ee(r.fileList) : b, w = (y, C) => {
871
877
  var P;
872
- "fileList" in r || I(y), (P = r.onChange) == null || P.call(r, y, C);
878
+ "fileList" in r || U(y), (P = r.onChange) == null || P.call(r, y, C);
873
879
  }, f = (y) => {
874
880
  y && setTimeout(() => {
875
- o.current && o.current.upload(y);
881
+ l.current && l.current.upload(y);
876
882
  }, 0);
877
- }, l = (y) => {
883
+ }, o = (y) => {
878
884
  var C;
879
- o.current && o.current.reupload(y), (C = r.onReupload) == null || C.call(r, y);
885
+ l.current && l.current.reupload(y), (C = r.onReupload) == null || C.call(r, y);
880
886
  }, c = (y) => {
881
887
  if (y) {
882
888
  const { onRemove: C } = r;
883
889
  Promise.resolve(
884
- k(C) ? C(y, U) : C
890
+ k(C) ? C(y, x) : C
885
891
  ).then((P) => {
886
- P !== !1 && (o.current && o.current.abort(y), w(
887
- U.filter((R) => R.uid !== y.uid),
892
+ P !== !1 && (l.current && l.current.abort(y), w(
893
+ x.filter((R) => R.uid !== y.uid),
888
894
  y
889
895
  ));
890
896
  }).catch((P) => {
@@ -892,12 +898,12 @@ const Qe = te.forwardRef(Xe), ee = function(e) {
892
898
  });
893
899
  }
894
900
  }, g = (y) => {
895
- y && o.current && o.current.abort(y);
901
+ y && l.current && l.current.abort(y);
896
902
  };
897
903
  fe(u, () => ({
898
904
  submit: (y) => {
899
905
  let C = [];
900
- y ? C = [y] : C = U.filter((P) => P.status === $.init), C.forEach((P) => {
906
+ y ? C = [y] : C = x.filter((P) => P.status === I.init), C.forEach((P) => {
901
907
  f(P);
902
908
  });
903
909
  },
@@ -907,24 +913,24 @@ const Qe = te.forwardRef(Xe), ee = function(e) {
907
913
  },
908
914
  // file: fileList中的file对象
909
915
  reupload: (y) => {
910
- l(y);
916
+ o(y);
911
917
  },
912
918
  getRootDOMNode: () => h.current
913
919
  }));
914
920
  const {
915
- listType: b,
921
+ listType: v,
916
922
  className: a,
917
923
  style: E,
918
924
  renderUploadItem: S,
919
925
  showUploadList: T,
920
926
  renderUploadList: q,
921
- progressProps: H,
927
+ progressProps: V,
922
928
  imagePreview: j,
923
929
  ...B
924
- } = r, d = me(r.limit) ? { hideOnExceedLimit: !0, maxCount: r.limit } : { hideOnExceedLimit: !0, ...r.limit }, x = d.maxCount && d.maxCount <= U.length, N = "disabled" in r ? r.disabled : !d.hideOnExceedLimit && x, L = /* @__PURE__ */ n(
930
+ } = r, d = me(r.limit) ? { hideOnExceedLimit: !0, maxCount: r.limit } : { hideOnExceedLimit: !0, ...r.limit }, $ = d.maxCount && d.maxCount <= x.length, N = "disabled" in r ? r.disabled : !d.hideOnExceedLimit && $, L = /* @__PURE__ */ n(
925
931
  "div",
926
932
  {
927
- ...$e(B, [
933
+ ...Ie(B, [
928
934
  "disabled",
929
935
  "directory",
930
936
  "onReupload",
@@ -959,10 +965,10 @@ const Qe = te.forwardRef(Xe), ee = function(e) {
959
965
  className: X(
960
966
  i,
961
967
  {
962
- [`${i}-type-${b}`]: b,
968
+ [`${i}-type-${v}`]: v,
963
969
  [`${i}-drag`]: r.drag,
964
970
  [`${i}-disabled`]: N,
965
- [`${i}-hide`]: d.hideOnExceedLimit && x,
971
+ [`${i}-hide`]: d.hideOnExceedLimit && $,
966
972
  [`${i}-rtl`]: t
967
973
  },
968
974
  a
@@ -972,17 +978,17 @@ const Qe = te.forwardRef(Xe), ee = function(e) {
972
978
  children: /* @__PURE__ */ n(
973
979
  Qe,
974
980
  {
975
- ref: o,
981
+ ref: l,
976
982
  ...r,
977
983
  limit: d.maxCount,
978
- hide: d.hideOnExceedLimit && x,
984
+ hide: d.hideOnExceedLimit && $,
979
985
  disabled: N,
980
986
  prefixCls: i,
981
- fileList: U,
987
+ fileList: x,
982
988
  onProgress: (y, C) => {
983
989
  var P;
984
- y && ("fileList" in r || I(
985
- U.map((R) => R.uid === y.uid ? y : R)
990
+ y && ("fileList" in r || U(
991
+ x.map((R) => R.uid === y.uid ? y : R)
986
992
  ), (P = r.onProgress) == null || P.call(r, y, C));
987
993
  },
988
994
  onFileStatusChange: w
@@ -991,28 +997,28 @@ const Qe = te.forwardRef(Xe), ee = function(e) {
991
997
  }
992
998
  );
993
999
  return /* @__PURE__ */ F(M, { children: [
994
- b !== "picture-card" && L,
1000
+ v !== "picture-card" && L,
995
1001
  T && /* @__PURE__ */ n(
996
1002
  ye,
997
1003
  {
998
1004
  imagePreview: j,
999
- progressProps: H,
1005
+ progressProps: V,
1000
1006
  showUploadList: T,
1001
1007
  disabled: r.disabled,
1002
- listType: b,
1003
- fileList: U,
1008
+ listType: v,
1009
+ fileList: x,
1004
1010
  renderUploadItem: S,
1005
1011
  renderUploadList: q,
1006
1012
  onUpload: f,
1007
1013
  onAbort: g,
1008
1014
  onRemove: c,
1009
- onReupload: l,
1015
+ onReupload: o,
1010
1016
  onPreview: r.onPreview,
1011
1017
  prefixCls: i
1012
1018
  }
1013
1019
  ),
1014
- b === "picture-card" && L,
1015
- r.tip && b === "picture-card" && /* @__PURE__ */ n("div", { className: `${i}-trigger-tip`, children: r.tip })
1020
+ v === "picture-card" && L,
1021
+ r.tip && v === "picture-card" && /* @__PURE__ */ n("div", { className: `${i}-trigger-tip`, children: r.tip })
1016
1022
  ] });
1017
1023
  }, pe = Q(
1018
1024
  Ze
@@ -1020,6 +1026,6 @@ const Qe = te.forwardRef(Xe), ee = function(e) {
1020
1026
  pe.displayName = "Upload";
1021
1027
  export {
1022
1028
  ye as F,
1023
- $ as S,
1029
+ I as S,
1024
1030
  pe as U
1025
1031
  };