@unicom-cloud/ui 0.8.81 → 0.8.82

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 (262) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +2 -2
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +2 -2
  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 +2 -2
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +5 -4
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +7 -7
  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 +2 -2
  31. package/Mentions.js +2 -2
  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 +5 -5
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Pagination.js +1 -1
  40. package/Popconfirm.js +1 -1
  41. package/Popover.js +1 -1
  42. package/Progress.js +1 -1
  43. package/Radio.js +1 -1
  44. package/Rate.js +1 -1
  45. package/ResizeBox.js +1 -1
  46. package/Result.js +1 -1
  47. package/Select.js +1 -1
  48. package/Skeleton.js +1 -1
  49. package/Slider.js +1 -1
  50. package/Space.js +1 -1
  51. package/SpeechSynthesis.js +1 -1
  52. package/Spin.js +1 -1
  53. package/Statistic.js +2 -2
  54. package/Steps.js +1 -1
  55. package/Switch.js +1 -1
  56. package/Table.js +1 -1
  57. package/Tabs.js +1 -1
  58. package/Tag.js +1 -1
  59. package/Tooltip.js +1 -1
  60. package/Transfer.js +2 -2
  61. package/Tree.js +1 -1
  62. package/TreeSelect.js +1 -1
  63. package/Trigger.js +1 -1
  64. package/Typography.js +1 -1
  65. package/affix/index.js +60 -57
  66. package/alert/index.js +53 -53
  67. package/anchor/Anchor.js +72 -72
  68. package/anchor/Link.js +27 -27
  69. package/anchor/util.js +1 -1
  70. package/auto-complete/index.js +2 -2
  71. package/avatar/Avatar.js +31 -31
  72. package/avatar/Group.js +25 -25
  73. package/back-top/index.js +30 -30
  74. package/badge/index.js +37 -37
  75. package/breadcrumb/index.js +26 -26
  76. package/button/Group.js +7 -7
  77. package/button/index.js +29 -29
  78. package/calendar/index.js +2 -2
  79. package/card/Grid.js +12 -12
  80. package/card/Meta.js +17 -17
  81. package/card/index.js +44 -44
  82. package/carousel/Arrow.js +19 -19
  83. package/carousel/Indicator.js +25 -25
  84. package/carousel/index.js +77 -77
  85. package/cascader/Cascader.js +2 -2
  86. package/cascader/index.js +1 -1
  87. package/cascader/util.js +1 -1
  88. package/checkbox/Checkbox.js +2 -2
  89. package/checkbox/Group.js +2 -2
  90. package/checkbox/GroupBlock.js +2 -2
  91. package/checkbox/index.js +2 -2
  92. package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
  93. package/chunk/CmMehQON.js +1464 -0
  94. package/chunk/Cplu5dtQ.js +730 -0
  95. package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
  96. package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
  97. package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
  98. package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
  99. package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
  100. package/chunk/{DLBfXSnU.js → w221i0nK.js} +2872 -2871
  101. package/collapse/Collapse.js +2 -2
  102. package/collapse/Item.js +2 -2
  103. package/collapse/index.js +1 -1
  104. package/color-picker/ControlBar.js +36 -36
  105. package/color-picker/InputAlpha.js +11 -11
  106. package/color-picker/InputHex.js +24 -24
  107. package/color-picker/InputRgb.js +23 -23
  108. package/color-picker/Palette.js +18 -18
  109. package/color-picker/Panel.js +2 -2
  110. package/color-picker/index.js +2 -2
  111. package/comment/index.js +31 -31
  112. package/config-provider/ConfigProvider.js +5 -4
  113. package/config-provider/context.js +2 -2
  114. package/config-provider/index.js +4 -3
  115. package/copy/index.js +28 -28
  116. package/date-picker/Picker.js +276 -276
  117. package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
  118. package/date-picker/index.js +26 -27
  119. package/descriptions/index.js +33 -33
  120. package/divider/index.js +12 -12
  121. package/draggable/index.js +23 -23
  122. package/drawer/Drawer.js +81 -81
  123. package/dropdown/Button.js +1 -1
  124. package/dropdown/index.js +56 -56
  125. package/empty/index.js +1 -1
  126. package/form/Form.js +76 -76
  127. package/form/FormItem.js +64 -64
  128. package/grid/Col.js +53 -53
  129. package/grid/Row.js +34 -34
  130. package/grid/grid-item.js +29 -29
  131. package/grid/grid.js +50 -50
  132. package/icon/index.js +20 -19
  133. package/icon-hover/index.js +1 -1
  134. package/image/Image.js +86 -86
  135. package/image/ImagePreview.js +2 -2
  136. package/image/ImagePreviewArrow.js +22 -22
  137. package/image/ImagePreviewGroup.js +1 -1
  138. package/image/index.js +1 -1
  139. package/index.js +410 -408
  140. package/input/Group.js +8 -8
  141. package/input/Input.js +322 -322
  142. package/input/InputElement.js +1 -1
  143. package/input/Password.js +1 -1
  144. package/input/Search.js +1 -1
  145. package/input/Textarea.js +1 -1
  146. package/input-number/index.js +1 -1
  147. package/input-tag/InputTag.js +40 -40
  148. package/layout/Content.js +7 -7
  149. package/layout/Footer.js +9 -9
  150. package/layout/Header.js +7 -7
  151. package/layout/Sider.js +55 -55
  152. package/layout/index.js +32 -32
  153. package/link/index.js +35 -35
  154. package/list/Item.js +29 -29
  155. package/list/Meta.js +12 -12
  156. package/list/index.js +2 -2
  157. package/mentions/index.js +2 -2
  158. package/menu/Menu.js +2 -2
  159. package/menu/OverflowWrap.js +1 -1
  160. package/menu/index.js +2 -2
  161. package/message/index.js +1 -1
  162. package/message/useMessage.js +1 -1
  163. package/modal/Confirm.js +2 -2
  164. package/modal/Modal.js +2 -2
  165. package/modal/index.js +1 -1
  166. package/notice/index.js +1 -1
  167. package/notification/index.js +5 -5
  168. package/notification/useNotification.js +1 -1
  169. package/overflow-ellipsis/OverflowItem.js +12 -12
  170. package/overflow-ellipsis/index.js +24 -24
  171. package/package.json +1 -1
  172. package/page-header/index.js +38 -38
  173. package/pagination/PageItem.js +16 -16
  174. package/pagination/PageJumper.js +1 -1
  175. package/pagination/PageOption.js +2 -2
  176. package/pagination/Pagination.js +2 -2
  177. package/pagination/index.js +1 -1
  178. package/picker/Input.js +69 -69
  179. package/picker/InputRange.js +111 -111
  180. package/popconfirm/index.js +61 -61
  181. package/popover/index.js +35 -35
  182. package/progress/index.js +22 -22
  183. package/radio/Group.js +2 -2
  184. package/radio/GroupBlock.js +2 -2
  185. package/radio/Radio.js +2 -2
  186. package/radio/index.js +2 -2
  187. package/rate/index.js +49 -49
  188. package/resize-box/ResizeTrigger.js +34 -34
  189. package/resize-box/Split.js +56 -56
  190. package/resize-box/SplitGroup.js +55 -55
  191. package/resize-box/index.js +51 -51
  192. package/result/index.js +41 -41
  193. package/select/Option.js +1 -1
  194. package/select/Select.js +2 -2
  195. package/select/index.js +2 -2
  196. package/select/util.js +1 -1
  197. package/select-view/Core.js +125 -125
  198. package/skeleton/index.js +20 -20
  199. package/slider/Button.js +57 -57
  200. package/slider/index.js +116 -116
  201. package/space/index.js +46 -44
  202. package/speech-synthesis/index.js +1 -1
  203. package/spin/DotLoading.js +10 -10
  204. package/spin/index.js +44 -44
  205. package/statistic/Countdown.js +34 -34
  206. package/statistic/index.js +67 -67
  207. package/steps/index.js +55 -55
  208. package/style.css +1 -1
  209. package/switch/index.js +54 -54
  210. package/table/Table.js +3 -3
  211. package/table/index.js +1 -1
  212. package/tabs/Tab.js +2 -2
  213. package/tabs/TabContent.js +2 -2
  214. package/tabs/TabPane.js +12 -12
  215. package/tabs/index.js +2 -2
  216. package/tag/index.js +45 -45
  217. package/time-picker/Picker.js +76 -76
  218. package/time-picker/TimePicker.js +136 -136
  219. package/time-picker/index.js +8 -8
  220. package/time-picker/util.js +5 -5
  221. package/timeline/Item.js +47 -47
  222. package/timeline/Timeline.js +41 -41
  223. package/tooltip/index.js +29 -29
  224. package/transfer/Item.js +2 -2
  225. package/transfer/List.js +2 -2
  226. package/transfer/index.js +2 -2
  227. package/tree/Animation.js +2 -2
  228. package/tree/Node.js +2 -2
  229. package/tree/NodeList.js +1 -1
  230. package/tree/Tree.js +2 -2
  231. package/tree/index.js +1 -1
  232. package/tree-select/List.js +1 -1
  233. package/tree-select/Select.js +2 -2
  234. package/tree-select/index.js +2 -2
  235. package/trigger/index.js +60 -60
  236. package/types/config-provider/ConfigProvider.d.ts +2 -2
  237. package/types/config-provider/context.d.ts +1 -1
  238. package/types/date-picker/index.d.ts +8 -9
  239. package/types/date-picker/interface.d.ts +9 -9
  240. package/types/index.d.ts +1 -1
  241. package/types/picker/Input.d.ts +2 -2
  242. package/types/space/index.d.ts +2 -1
  243. package/types/utils/names.d.ts +1 -1
  244. package/typography/Base.js +53 -53
  245. package/typography/Ellipsis.js +9 -8
  246. package/typography/Operations.js +28 -28
  247. package/typography/Paragraph.js +8 -8
  248. package/typography/Typography.js +7 -7
  249. package/typography/index.js +1 -1
  250. package/upload/TriggerNode.js +47 -47
  251. package/upload/Upload.js +184 -184
  252. package/utils/contextHolder.js +3 -3
  253. package/utils/index.js +13 -13
  254. package/utils/names.js +1 -1
  255. package/utils/setPrimaryColor.js +18 -13
  256. package/utils/tween.js +1 -1
  257. package/verification-code/VerificationCode.js +49 -49
  258. package/version/index.js +1 -1
  259. package/watermark/Watermark.js +24 -24
  260. package/chunk/CQvM33Vg.js +0 -724
  261. package/chunk/yhU2zeeu.js +0 -1461
  262. /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
@@ -1,28 +1,28 @@
1
1
  var ht = Object.defineProperty;
2
2
  var vt = (a, t, o) => t in a ? ht(a, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[t] = o;
3
- var ye = (a, t, o) => vt(a, typeof t != "symbol" ? t + "" : t, o);
3
+ var ke = (a, t, o) => vt(a, typeof t != "symbol" ? t + "" : t, o);
4
4
  import { jsx as s, jsxs as M } from "react/jsx-runtime";
5
5
  import xe from "@unicom-cloud/icons/IconUiClose";
6
6
  import bt from "@unicom-cloud/icons/IconUiCopy";
7
7
  import yt from "@unicom-cloud/icons/IconUiFullscreen";
8
- import xt from "@unicom-cloud/icons/IconUiLeft";
9
- import kt from "@unicom-cloud/icons/IconUiLoading";
10
- import Ct from "@unicom-cloud/icons/IconUiOriginalSize";
11
- import It from "@unicom-cloud/icons/IconUiRight";
8
+ import kt from "@unicom-cloud/icons/IconUiLeft";
9
+ import xt from "@unicom-cloud/icons/IconUiLoading";
10
+ import It from "@unicom-cloud/icons/IconUiOriginalSize";
11
+ import Ct from "@unicom-cloud/icons/IconUiRight";
12
12
  import St from "@unicom-cloud/icons/IconUiRotateLeft";
13
13
  import wt from "@unicom-cloud/icons/IconUiRotateRight";
14
14
  import Pt from "@unicom-cloud/icons/IconUiZoomIn";
15
15
  import Lt from "@unicom-cloud/icons/IconUiZoomOut";
16
16
  import Nt from "lodash/isUndefined";
17
- import { useState as g, forwardRef as zt, useContext as ke, useRef as x, useMemo as Ce, useImperativeHandle as At, useCallback as Mt, useEffect as v } from "react";
18
- import { a as Tt, b as Et } from "./CQvM33Vg.js";
17
+ import { useState as h, forwardRef as zt, useContext as Ie, useRef as x, useMemo as Ce, useImperativeHandle as At, useCallback as Mt, useEffect as b } from "react";
18
+ import { a as Tt, b as Et } from "./Cplu5dtQ.js";
19
19
  import "lodash/isEqualWith";
20
20
  import { u as Ot } from "./CXPOj2uy.js";
21
21
  import "./ClM74To2.js";
22
22
  import { ArrowDown as $t, ArrowUp as Ut, ArrowLeft as Rt, ArrowRight as Yt, Esc as Dt } from "@unicom-cloud/utils/constant/keyboardCode";
23
23
  import "lodash/isNumber";
24
24
  import "lodash/merge";
25
- import { isServerRendering as Xt, on as J, off as Q } from "../utils/dom.js";
25
+ import { isServerRendering as Xt, on as Q, off as ee } from "../utils/dom.js";
26
26
  import "./B4WG1mhs.js";
27
27
  import { u as Vt } from "./BFTV6myl.js";
28
28
  import { u as Bt } from "./DU1RCDfh.js";
@@ -31,8 +31,8 @@ import "@unicom-cloud/utils/constant";
31
31
  import { u as Wt } from "./a3hR6zLw.js";
32
32
  import "lodash/debounce";
33
33
  import Zt from "../portal/index.js";
34
- import { P as Ie } from "./NPajzdOv.js";
35
- import Se from "@unicom-cloud/utils/class-name";
34
+ import { P as Se } from "./NPajzdOv.js";
35
+ import we from "@unicom-cloud/utils/class-name";
36
36
  import jt from "@unicom-cloud/utils/clipboard-copy";
37
37
  import { r as Ht } from "./CIRG541s.js";
38
38
  import Gt from "../image/ImagePreviewArrow.js";
@@ -40,10 +40,10 @@ import _t from "../image/ImagePreviewToolbar.js";
40
40
  import { PreviewGroupContext as qt } from "../image/previewGroupContext.js";
41
41
  import Kt from "lodash/isArray";
42
42
  function Jt(a, t, o, n, i) {
43
- let m = o, f = n;
44
- return o && (a.width > t.width ? m = 0 : (t.left > a.left && (m -= Math.abs(a.left - t.left) / i), t.right < a.right && (m += Math.abs(a.right - t.right) / i))), n && (a.height > t.height ? f = 0 : (t.top > a.top && (f -= Math.abs(a.top - t.top) / i), t.bottom < a.bottom && (f += Math.abs(a.bottom - t.bottom) / i))), [m, f];
43
+ let f = o, u = n;
44
+ return o && (a.width > t.width ? f = 0 : (t.left > a.left && (f -= Math.abs(a.left - t.left) / i), t.right < a.right && (f += Math.abs(a.right - t.right) / i))), n && (a.height > t.height ? u = 0 : (t.top > a.top && (u -= Math.abs(a.top - t.top) / i), t.bottom < a.bottom && (u += Math.abs(a.bottom - t.bottom) / i))), [f, u];
45
45
  }
46
- const we = [
46
+ const Pe = [
47
47
  25,
48
48
  33,
49
49
  50,
@@ -64,7 +64,7 @@ const we = [
64
64
  ];
65
65
  class Qt {
66
66
  constructor(t) {
67
- ye(this, "scaleAttr");
67
+ ke(this, "scaleAttr");
68
68
  this.updateScale(t);
69
69
  }
70
70
  get scales() {
@@ -77,10 +77,10 @@ class Qt {
77
77
  return this.scaleAttr[this.scaleAttr.length - 1];
78
78
  }
79
79
  updateScale(t) {
80
- let o = we;
80
+ let o = Pe;
81
81
  if (Kt(t) && t.filter((n) => n > 0).length && (o = t.filter((n) => n > 0)), o = o.map((n) => +(n / 100).toFixed(2)), !o.includes(1)) {
82
- const n = this.findClosestIndex(1, o), m = o[n] < 1 ? n + 1 : n;
83
- o.splice(m, 0, 1);
82
+ const n = this.findClosestIndex(1, o), f = o[n] < 1 ? n + 1 : n;
83
+ o.splice(f, 0, 1);
84
84
  }
85
85
  this.scaleAttr = o;
86
86
  }
@@ -91,14 +91,14 @@ class Qt {
91
91
  return 0;
92
92
  let n = o.length - 1;
93
93
  for (let i = 0; i < o.length; i++) {
94
- const m = o[i];
95
- if (t === m) {
94
+ const f = o[i];
95
+ if (t === f) {
96
96
  n = i;
97
97
  break;
98
98
  }
99
- if (t < m) {
100
- const f = o[i - 1];
101
- n = f === void 0 || Math.abs(f - t) <= Math.abs(m - t) ? i - 1 : i;
99
+ if (t < f) {
100
+ const u = o[i - 1];
101
+ n = u === void 0 || Math.abs(u - t) <= Math.abs(f - t) ? i - 1 : i;
102
102
  break;
103
103
  }
104
104
  }
@@ -110,7 +110,7 @@ class Qt {
110
110
  }
111
111
  }
112
112
  function eo(a) {
113
- const [t, o] = g(a);
113
+ const [t, o] = h(a);
114
114
  return {
115
115
  status: t,
116
116
  isBeforeLoad: t === "beforeLoad",
@@ -121,7 +121,7 @@ function eo(a) {
121
121
  setStatus: o
122
122
  };
123
123
  }
124
- const ee = 90, to = {
124
+ const te = 90, to = {
125
125
  maskClosable: !0,
126
126
  closable: !0,
127
127
  breakPoint: 316,
@@ -142,7 +142,7 @@ const ee = 90, to = {
142
142
  ],
143
143
  getPopupContainer: () => document.body,
144
144
  escToExit: !0,
145
- scales: we,
145
+ scales: Pe,
146
146
  resetTranslate: !0
147
147
  };
148
148
  function oo(a, t) {
@@ -150,241 +150,241 @@ function oo(a, t) {
150
150
  previewGroup: o,
151
151
  previewUrlMap: n,
152
152
  currentIndex: i,
153
- setCurrentIndex: m,
154
- infinite: f,
155
- previewPropsMap: te
156
- } = ke(qt), Pe = o ? te.get(i) : {}, T = Vt(
153
+ setCurrentIndex: f,
154
+ infinite: u,
155
+ previewPropsMap: oe
156
+ } = Ie(qt), Le = o ? oe.get(i) : {}, T = Vt(
157
157
  a,
158
158
  to,
159
- Pe
159
+ Le
160
160
  ), {
161
- className: Le,
162
- style: Ne,
163
- src: ze,
164
- defaultVisible: Ae,
165
- maskClosable: Me,
166
- closable: Te,
167
- breakPoint: Ee,
168
- actions: Oe,
169
- actionsLayout: $e,
161
+ className: Ne,
162
+ style: ze,
163
+ src: Ae,
164
+ defaultVisible: Me,
165
+ maskClosable: Te,
166
+ closable: Ee,
167
+ breakPoint: Oe,
168
+ actions: $e,
169
+ actionsLayout: Ue,
170
170
  getPopupContainer: S,
171
171
  onVisibleChange: E,
172
172
  scales: O,
173
- escToExit: oe,
174
- imgAttributes: Ue = {},
173
+ escToExit: ne,
174
+ imgAttributes: Re = {},
175
175
  imageRender: $,
176
- extra: Re = null,
177
- resetTranslate: ne
178
- } = T, w = o ? n.get(i) : ze, [U, Ye] = g(w), [l, De] = Ot(!1, {
179
- defaultValue: Ae,
176
+ extra: Ye = null,
177
+ resetTranslate: re
178
+ } = T, w = o ? n.get(i) : Ae, [U, De] = h(w), [m, Xe] = Ot(!1, {
179
+ defaultValue: Me,
180
180
  value: T.visible
181
- }), re = ke(Tt), { getPrefixCls: Xe, locale: C, rtl: Ve } = re, ie = Xe("image"), u = `${ie}-preview`, Be = Se(
182
- u,
181
+ }), ie = Ie(Tt), { getPrefixCls: R, locale: l, rtl: Ve } = ie, se = R == null ? void 0 : R("image"), d = `${se}-preview`, Be = we(
182
+ d,
183
183
  {
184
- [`${u}-hide`]: !l,
185
- [`${u}-rtl`]: Ve
184
+ [`${d}-hide`]: !m,
185
+ [`${d}-rtl`]: Ve
186
186
  },
187
- Le
188
- ), P = x(), Fe = x(), b = x(), se = x(), R = x(!1), I = x({
187
+ Ne
188
+ ), P = x(), Fe = x(), y = x(), ae = x(), Y = x(!1), C = x({
189
189
  pageX: 0,
190
190
  pageY: 0,
191
191
  originX: 0,
192
192
  originY: 0
193
- }), { isLoading: We, isLoaded: Ze, setStatus: Y } = eo("loading"), [je, He] = g(!1), [p, D] = g({ x: 0, y: 0 }), [c, X] = g(1), [ae, ce] = g(!1), [L, V] = g(0), [h, le] = g(!1), y = Ce(() => new Qt(O), []), {
194
- onLoad: B,
195
- onError: F,
196
- onMouseDown: W,
193
+ }), { isLoading: We, isLoaded: Ze, setStatus: D } = eo("loading"), [je, He] = h(!1), [g, X] = h({ x: 0, y: 0 }), [c, V] = h(1), [ce, le] = h(!1), [L, B] = h(0), [v, me] = h(!1), k = Ce(() => new Qt(O), []), {
194
+ onLoad: F,
195
+ onError: W,
196
+ onMouseDown: Z,
197
197
  style: Ge,
198
198
  className: _e,
199
199
  ...qe
200
- } = Ue, me = !f && i <= 0, fe = !f && i >= n.size - 1;
201
- function Z() {
202
- D({ x: 0, y: 0 }), X(1), V(0);
200
+ } = Re, fe = !u && i <= 0, ue = !u && i >= n.size - 1;
201
+ function j() {
202
+ X({ x: 0, y: 0 }), V(1), B(0);
203
203
  }
204
204
  At(t, () => ({
205
- reset: Z,
206
- getRootDOMNode: () => se.current
205
+ reset: j,
206
+ getRootDOMNode: () => ae.current
207
207
  }));
208
- const [N, Ke] = g(), ue = Mt(() => N, [N]);
209
- v(() => {
208
+ const [N, Ke] = h(), de = Mt(() => N, [N]);
209
+ b(() => {
210
210
  const e = S == null ? void 0 : S(), r = Ft(e) || document.body;
211
211
  Ke(r);
212
- }, [S]), Bt(ue, { hidden: l });
212
+ }, [S]), Bt(de, { hidden: m });
213
213
  const Je = Ce(
214
214
  () => !Xt && N === document.body,
215
215
  [N]
216
216
  );
217
- function de(e) {
217
+ function pe(e) {
218
218
  const r = n.size;
219
- f && (e %= r, e < 0 && (e = r - Math.abs(e))), e !== i && e >= 0 && e <= r - 1 && m(e);
220
- }
221
- function j() {
222
- de(i - 1);
219
+ u && (e %= r, e < 0 && (e = r - Math.abs(e))), e !== i && e >= 0 && e <= r - 1 && f(e);
223
220
  }
224
221
  function H() {
225
- de(i + 1);
222
+ pe(i - 1);
223
+ }
224
+ function G() {
225
+ pe(i + 1);
226
226
  }
227
227
  function Qe() {
228
- V(L === 0 ? 360 - ee : L - ee);
228
+ B(L === 0 ? 360 - te : L - te);
229
229
  }
230
230
  function et() {
231
- V((L + ee) % 360);
231
+ B((L + te) % 360);
232
232
  }
233
- const G = x(null), tt = () => {
234
- !ae && ce(!0), G.current && clearTimeout(G.current), G.current = setTimeout(() => {
235
- ce(!1);
233
+ const _ = x(null), tt = () => {
234
+ !ce && le(!0), _.current && clearTimeout(_.current), _.current = setTimeout(() => {
235
+ le(!1);
236
236
  }, 1e3);
237
237
  }, z = (e) => {
238
- c !== e && (X(e), tt());
238
+ c !== e && (V(e), tt());
239
239
  };
240
- function _() {
241
- const e = y.getNextScale(c, "zoomIn");
240
+ function q() {
241
+ const e = k.getNextScale(c, "zoomIn");
242
242
  z(e);
243
243
  }
244
- function q() {
245
- const e = y.getNextScale(c, "zoomOut");
244
+ function K() {
245
+ const e = k.getNextScale(c, "zoomOut");
246
246
  z(e);
247
247
  }
248
248
  function ot(e) {
249
- e.deltaY > 0 ? c >= y.minScale && q() : c <= y.maxScale && _();
249
+ e.deltaY > 0 ? c >= k.minScale && K() : c <= k.maxScale && q();
250
250
  }
251
251
  function nt() {
252
252
  z(1);
253
253
  }
254
254
  function rt() {
255
- const e = b.current.getBoundingClientRect(), r = P.current.getBoundingClientRect(), d = e.height / (r.height / c), k = e.width / (r.width / c), K = Math.max(d, k);
256
- z(K);
255
+ const e = y.current.getBoundingClientRect(), r = P.current.getBoundingClientRect(), p = e.height / (r.height / c), I = e.width / (r.width / c), J = Math.max(p, I);
256
+ z(J);
257
257
  }
258
- function pe(e) {
259
- e.target === e.currentTarget && Me && A();
258
+ function ge(e) {
259
+ e.target === e.currentTarget && Te && A();
260
260
  }
261
261
  function it() {
262
262
  jt(U);
263
263
  }
264
- function ge() {
264
+ function he() {
265
265
  A();
266
266
  }
267
267
  function st(e) {
268
268
  A();
269
269
  }
270
270
  function A() {
271
- l && (E == null || E(!1, l), Nt(T.visible) && De(!1));
271
+ m && (E == null || E(!1, m), Nt(T.visible) && Xe(!1));
272
272
  }
273
273
  function at(e) {
274
274
  if (e && e.length) {
275
- const d = e[0].contentRect.width < Ee;
276
- He(d);
275
+ const p = e[0].contentRect.width < Oe;
276
+ He(p);
277
277
  }
278
278
  }
279
- const he = () => {
280
- if (!b.current || !P.current)
279
+ const ve = () => {
280
+ if (!y.current || !P.current)
281
281
  return;
282
- const e = b.current.getBoundingClientRect(), r = P.current.getBoundingClientRect(), [d, k] = Jt(
282
+ const e = y.current.getBoundingClientRect(), r = P.current.getBoundingClientRect(), [p, I] = Jt(
283
283
  e,
284
284
  r,
285
- p.x,
286
- p.y,
285
+ g.x,
286
+ g.y,
287
287
  c
288
288
  );
289
- (d !== p.x || k !== p.y) && D({
290
- x: d,
291
- y: k
289
+ (p !== g.x || I !== g.y) && X({
290
+ x: p,
291
+ y: I
292
292
  });
293
- }, ve = (e) => {
293
+ }, be = (e) => {
294
294
  var r;
295
- if (l && h) {
295
+ if (m && v) {
296
296
  (r = e.preventDefault) == null || r.call(e);
297
- const { originX: d, originY: k, pageX: K, pageY: dt } = I.current, pt = d + (e.pageX - K) / c, gt = k + (e.pageY - dt) / c;
298
- D({
297
+ const { originX: p, originY: I, pageX: J, pageY: dt } = C.current, pt = p + (e.pageX - J) / c, gt = I + (e.pageY - dt) / c;
298
+ X({
299
299
  x: pt,
300
300
  y: gt
301
301
  });
302
302
  }
303
- }, be = (e) => {
303
+ }, ye = (e) => {
304
304
  var r;
305
- (r = e.preventDefault) == null || r.call(e), le(!1);
305
+ (r = e.preventDefault) == null || r.call(e), me(!1);
306
306
  };
307
307
  function ct(e) {
308
- Y("loaded"), B == null || B(e);
308
+ D("loaded"), F == null || F(e);
309
309
  }
310
310
  function lt(e) {
311
- Y("error"), F == null || F(e);
311
+ D("error"), W == null || W(e);
312
312
  }
313
313
  const mt = (e) => {
314
- var d;
315
- (d = e.preventDefault) == null || d.call(e), le(!0);
314
+ var p;
315
+ (p = e.preventDefault) == null || p.call(e), me(!0);
316
316
  const r = e.type === "touchstart" ? e.touches[0] : e;
317
- I.current.pageX = r.pageX, I.current.pageY = r.pageY, I.current.originX = p.x, I.current.originY = p.y, W == null || W(e);
317
+ C.current.pageX = r.pageX, C.current.pageY = r.pageY, C.current.originX = g.x, C.current.originY = g.y, Z == null || Z(e);
318
318
  };
319
- v(() => (l && h && (J(document, "mousemove", ve, !1), J(document, "mouseup", be, !1)), () => {
320
- Q(document, "mousemove", ve, !1), Q(document, "mouseup", be, !1);
321
- }), [l, h]), v(() => {
322
- ne && !h && he();
323
- }, [h, p]), v(() => {
324
- ne && he();
325
- }, [c]), v(() => {
326
- l && Z();
327
- }, [l]), v(() => {
328
- Ye(w), Y(w ? "loading" : "loaded"), Z();
319
+ b(() => (m && v && (Q(document, "mousemove", be, !1), Q(document, "mouseup", ye, !1)), () => {
320
+ ee(document, "mousemove", be, !1), ee(document, "mouseup", ye, !1);
321
+ }), [m, v]), b(() => {
322
+ re && !v && ve();
323
+ }, [v, g]), b(() => {
324
+ re && ve();
325
+ }, [c]), b(() => {
326
+ m && j();
327
+ }, [m]), b(() => {
328
+ De(w), D(w ? "loading" : "loaded"), j();
329
329
  }, [w]), Wt(() => {
330
- y.updateScale(O), X(1);
331
- }, [O]), v(() => {
330
+ k.updateScale(O), V(1);
331
+ }, [O]), b(() => {
332
332
  const e = (r) => {
333
333
  if (r)
334
334
  switch (r.key) {
335
335
  case Dt.key:
336
- oe && A();
336
+ ne && A();
337
337
  break;
338
338
  case Yt.key:
339
- H();
339
+ G();
340
340
  break;
341
341
  case Rt.key:
342
- j();
342
+ H();
343
343
  break;
344
344
  case Ut.key:
345
- _();
345
+ q();
346
346
  break;
347
347
  case $t.key:
348
- q();
348
+ K();
349
349
  break;
350
350
  }
351
351
  };
352
- return l && !h && !R.current && (R.current = !0, J(document, "keydown", e)), () => {
353
- R.current = !1, Q(document, "keydown", e);
352
+ return m && !v && !Y.current && (Y.current = !0, Q(document, "keydown", e)), () => {
353
+ Y.current = !1, ee(document, "keydown", e);
354
354
  };
355
- }, [l, oe, h, i, c]);
355
+ }, [m, ne, v, i, c]);
356
356
  const ft = [
357
357
  !1,
358
358
  {
359
359
  key: "rotateRight",
360
- name: C.ImagePreview.rotateRight,
360
+ name: l == null ? void 0 : l.ImagePreview.rotateRight,
361
361
  content: /* @__PURE__ */ s(wt, {}),
362
362
  onClick: et
363
363
  },
364
364
  {
365
365
  key: "rotateLeft",
366
- name: C.ImagePreview.rotateLeft,
366
+ name: l == null ? void 0 : l.ImagePreview.rotateLeft,
367
367
  content: /* @__PURE__ */ s(St, {}),
368
368
  onClick: Qe
369
369
  },
370
370
  {
371
371
  key: "zoomIn",
372
- name: C.ImagePreview.zoomIn,
372
+ name: l == null ? void 0 : l.ImagePreview.zoomIn,
373
373
  content: /* @__PURE__ */ s(Pt, {}),
374
- onClick: _,
375
- disabled: c === y.maxScale
374
+ onClick: q,
375
+ disabled: c === k.maxScale
376
376
  },
377
377
  {
378
378
  key: "zoomOut",
379
- name: C.ImagePreview.zoomOut,
379
+ name: l == null ? void 0 : l.ImagePreview.zoomOut,
380
380
  content: /* @__PURE__ */ s(Lt, {}),
381
- onClick: q,
382
- disabled: c === y.minScale
381
+ onClick: K,
382
+ disabled: c === k.minScale
383
383
  },
384
384
  {
385
385
  key: "originalSize",
386
- name: C.ImagePreview.originalSize,
387
- content: /* @__PURE__ */ s(Ct, {}),
386
+ name: l == null ? void 0 : l.ImagePreview.originalSize,
387
+ content: /* @__PURE__ */ s(It, {}),
388
388
  onClick: nt
389
389
  },
390
390
  {
@@ -396,16 +396,16 @@ function oo(a, t) {
396
396
  !!o && {
397
397
  key: "next",
398
398
  name: "下一张",
399
- content: /* @__PURE__ */ s(It, {}),
400
- disabled: fe,
401
- onClick: H
399
+ content: /* @__PURE__ */ s(Ct, {}),
400
+ disabled: ue,
401
+ onClick: G
402
402
  },
403
403
  !!o && {
404
404
  key: "prev",
405
405
  name: "上一张",
406
- content: /* @__PURE__ */ s(xt, {}),
407
- disabled: me,
408
- onClick: j
406
+ content: /* @__PURE__ */ s(kt, {}),
407
+ disabled: fe,
408
+ onClick: H
409
409
  },
410
410
  {
411
411
  key: "copy",
@@ -417,27 +417,27 @@ function oo(a, t) {
417
417
  key: "close",
418
418
  name: "关闭",
419
419
  content: /* @__PURE__ */ s(xe, {}),
420
- onClick: ge
420
+ onClick: he
421
421
  }
422
422
  ].filter(Boolean);
423
- v(() => {
424
- const e = Ht([b.current], at);
423
+ b(() => {
424
+ const e = Ht([y.current], at);
425
425
  return () => {
426
426
  e();
427
427
  };
428
- }, [b.current]);
428
+ }, [y.current]);
429
429
  const ut = () => {
430
430
  const e = /* @__PURE__ */ s(
431
431
  "img",
432
432
  {
433
433
  onWheel: ot,
434
434
  ref: P,
435
- className: Se(_e, `${u}-img`, {
436
- [`${u}-img-moving`]: h
435
+ className: we(_e, `${d}-img`, {
436
+ [`${d}-img-moving`]: v
437
437
  }),
438
438
  style: {
439
439
  ...Ge,
440
- transform: `translate(${p.x}px, ${p.y}px) rotate(${L}deg)`
440
+ transform: `translate(${g.x}px, ${g.y}px) rotate(${L}deg)`
441
441
  },
442
442
  src: U,
443
443
  ...qe,
@@ -451,26 +451,26 @@ function oo(a, t) {
451
451
  );
452
452
  return ($ == null ? void 0 : $(e)) ?? e;
453
453
  };
454
- return /* @__PURE__ */ s(Zt, { visible: l, forceRender: !1, getContainer: ue, children: /* @__PURE__ */ s(
454
+ return /* @__PURE__ */ s(Zt, { visible: m, forceRender: !1, getContainer: de, children: /* @__PURE__ */ s(
455
455
  Et,
456
456
  {
457
- ...re,
457
+ ...ie,
458
458
  childrenName: "ImagePreview",
459
- getPopupContainer: () => b.current,
459
+ getPopupContainer: () => y.current,
460
460
  children: /* @__PURE__ */ M(
461
461
  "div",
462
462
  {
463
463
  className: Be,
464
464
  style: {
465
- ...Ne || {},
465
+ ...ze || {},
466
466
  ...Je ? {} : { zIndex: "inherit", position: "absolute" }
467
467
  },
468
- ref: se,
468
+ ref: ae,
469
469
  children: [
470
470
  /* @__PURE__ */ s(
471
- Ie,
471
+ Se,
472
472
  {
473
- in: l,
473
+ in: m,
474
474
  timeout: 400,
475
475
  appear: !0,
476
476
  classNames: "fadeImage",
@@ -482,38 +482,38 @@ function oo(a, t) {
482
482
  onExited: (e) => {
483
483
  e && (e.parentNode.style.display = "", e.style.display = "none");
484
484
  },
485
- children: /* @__PURE__ */ s("div", { className: `${u}-mask`, onClick: st })
485
+ children: /* @__PURE__ */ s("div", { className: `${d}-mask`, onClick: st })
486
486
  }
487
487
  ),
488
- l && /* @__PURE__ */ M(
488
+ m && /* @__PURE__ */ M(
489
489
  "div",
490
490
  {
491
- ref: b,
492
- className: `${u}-wrapper`,
493
- onClick: pe,
491
+ ref: y,
492
+ className: `${d}-wrapper`,
493
+ onClick: ge,
494
494
  children: [
495
495
  /* @__PURE__ */ M(
496
496
  "div",
497
497
  {
498
498
  ref: Fe,
499
- className: `${u}-img-container`,
499
+ className: `${d}-img-container`,
500
500
  style: { transform: `scale(${c}, ${c})` },
501
- onClick: pe,
501
+ onClick: ge,
502
502
  children: [
503
503
  ut(),
504
- We && /* @__PURE__ */ s("div", { className: `${u}-loading`, children: /* @__PURE__ */ s(kt, {}) })
504
+ We && /* @__PURE__ */ s("div", { className: `${d}-loading`, children: /* @__PURE__ */ s(xt, {}) })
505
505
  ]
506
506
  }
507
507
  ),
508
508
  /* @__PURE__ */ s(
509
- Ie,
509
+ Se,
510
510
  {
511
- in: ae,
511
+ in: ce,
512
512
  timeout: 400,
513
513
  appear: !0,
514
514
  classNames: "fadeImage",
515
515
  unmountOnExit: !0,
516
- children: /* @__PURE__ */ M("div", { className: `${u}-scale-value`, children: [
516
+ children: /* @__PURE__ */ M("div", { className: `${d}-scale-value`, children: [
517
517
  (c * 100).toFixed(0),
518
518
  "%"
519
519
  ] })
@@ -522,19 +522,19 @@ function oo(a, t) {
522
522
  Ze && /* @__PURE__ */ s(
523
523
  _t,
524
524
  {
525
- prefixCls: ie,
526
- previewPrefixCls: u,
527
- actions: Oe,
528
- actionsLayout: $e,
525
+ prefixCls: se,
526
+ previewPrefixCls: d,
527
+ actions: $e,
528
+ actionsLayout: Ue,
529
529
  defaultActions: ft,
530
530
  simple: je
531
531
  }
532
532
  ),
533
- Te && /* @__PURE__ */ s(
533
+ Ee && /* @__PURE__ */ s(
534
534
  "div",
535
535
  {
536
- className: `${u}-close-btn`,
537
- onClick: ge,
536
+ className: `${d}-close-btn`,
537
+ onClick: he,
538
538
  children: /* @__PURE__ */ s(xe, {})
539
539
  }
540
540
  ),
@@ -543,14 +543,14 @@ function oo(a, t) {
543
543
  {
544
544
  previewCount: n.size,
545
545
  current: i,
546
- infinite: f,
547
- disableLeft: me,
548
- disableRight: fe,
549
- onPrev: j,
550
- onNext: H
546
+ infinite: u,
547
+ disableLeft: fe,
548
+ disableRight: ue,
549
+ onPrev: H,
550
+ onNext: G
551
551
  }
552
552
  ),
553
- Re
553
+ Ye
554
554
  ]
555
555
  }
556
556
  )