@unicom-cloud/ui 0.8.57 → 0.8.59

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 (260) hide show
  1. package/Affix.js +15 -15
  2. package/Alert.js +5 -5
  3. package/Anchor.js +1 -1
  4. package/AutoComplete.js +28 -28
  5. package/Avatar.js +11 -11
  6. package/BackTop.js +28 -28
  7. package/Badge.js +10 -10
  8. package/Breadcrumb.js +6 -6
  9. package/Button.js +11 -10
  10. package/Calendar.js +8 -8
  11. package/Card.js +3 -3
  12. package/Carousel.js +7 -7
  13. package/Cascader.js +1 -1
  14. package/Checkbox.js +1 -1
  15. package/Collapse.js +1 -1
  16. package/ColorPicker.js +582 -11
  17. package/Comment.js +7 -7
  18. package/ConfigProvider.js +2 -2
  19. package/Copy.js +6 -6
  20. package/DatePicker.js +14 -12
  21. package/Descriptions.js +3 -3
  22. package/Divider.js +3 -3
  23. package/Draggable.js +12 -12
  24. package/Drawer.js +1 -1
  25. package/Dropdown.js +5 -5
  26. package/Empty.js +3 -3
  27. package/Form.js +1410 -10
  28. package/Grid.js +14 -14
  29. package/Icon.js +2 -2
  30. package/IconHover.js +2 -2
  31. package/Image.js +1 -1
  32. package/Input.js +2 -2
  33. package/InputNumber.js +8 -8
  34. package/InputTag.js +1 -1
  35. package/Layout.js +8 -8
  36. package/Link.js +13 -13
  37. package/List.js +21 -21
  38. package/Mentions.js +30 -30
  39. package/Menu.js +1 -1
  40. package/Message.js +3 -3
  41. package/Modal.js +1 -1
  42. package/Notice.js +3 -3
  43. package/Notification.js +4 -4
  44. package/OverflowEllipsis.js +9 -9
  45. package/PageHeader.js +10 -10
  46. package/Pagination.js +1 -1
  47. package/Picker.js +1 -1
  48. package/Popconfirm.js +5 -5
  49. package/Popover.js +7 -7
  50. package/Portal.js +1 -1
  51. package/Progress.js +15 -15
  52. package/Radio.js +2 -2
  53. package/Rate.js +10 -10
  54. package/ResizeBox.js +10 -11
  55. package/Result.js +11 -11
  56. package/Select.js +1 -1
  57. package/SelectView.js +40 -41
  58. package/Skeleton.js +4 -4
  59. package/Slider.js +9 -9
  60. package/Space.js +12 -12
  61. package/SpeechSynthesis.js +1 -1
  62. package/Spin.js +11 -11
  63. package/Statistic.js +43 -43
  64. package/Steps.js +5 -5
  65. package/Switch.js +15 -16
  66. package/Table.js +17 -17
  67. package/Tabs.js +1 -1
  68. package/Tag.js +5 -5
  69. package/TimePicker.js +38 -38
  70. package/Timeline.js +1 -1
  71. package/Tooltip.js +9 -9
  72. package/Transfer.js +26 -26
  73. package/Tree.js +1 -1
  74. package/TreeSelect.js +1 -1
  75. package/Trigger.js +11 -11
  76. package/Typography.js +1 -1
  77. package/Upload.js +4 -1
  78. package/VerificationCode.js +1 -1
  79. package/Version.js +1 -1
  80. package/VirtualList.js +1 -1
  81. package/Watermark.js +1 -1
  82. package/chunk/{m_kOQCiU.js → -LZOUh53.js} +1 -1
  83. package/chunk/{CXNW5Y2a.js → -jdfq71f.js} +1 -1
  84. package/chunk/{CkAOsst1.js → 4-gvEY5y.js} +30 -30
  85. package/chunk/{DQXq1QT0.js → B0GOLsj_.js} +1 -1
  86. package/chunk/{BMvZCjSU.js → B16KHtX-.js} +16 -16
  87. package/chunk/{CggcswbO.js → B2vORJQ8.js} +19 -15
  88. package/chunk/{BCk8e9fj.js → B7Zsp3gO.js} +1 -1
  89. package/chunk/B8QV6E2b.js +34 -0
  90. package/chunk/{BeM2hfks.js → BBVjSFnw.js} +27 -23
  91. package/chunk/{1mEO29GP.js → BDjXkzNj.js} +1 -1
  92. package/chunk/{BuEC_zcc.js → BEDYCG-I.js} +31 -31
  93. package/chunk/{B45v5S9k.js → BHn4xgbv.js} +1 -1
  94. package/chunk/{CF3Telny.js → BJ_7JTqC.js} +3 -3
  95. package/chunk/{BM6dpkeM.js → BLSiP_gg.js} +1 -1
  96. package/chunk/{9Gh1afjL.js → BMJfSSLX.js} +1 -1
  97. package/chunk/{DBJ8d0o0.js → BNHrEI0Y.js} +31 -31
  98. package/chunk/{BP7xX86Q.js → BPZ-6HKJ.js} +131 -134
  99. package/chunk/{DxNRWF67.js → BVLwPZis.js} +11 -11
  100. package/chunk/{BpwDupra.js → BYhtrDV3.js} +9 -9
  101. package/chunk/{D6mVoX-C.js → B_nfMl0e.js} +1 -1
  102. package/chunk/{BWx1cVT_.js → BcS17Pzy.js} +1 -1
  103. package/chunk/Bdh4XVuf.js +1487 -0
  104. package/chunk/{BkHxm4sv.js → BdiEwtQO.js} +1 -1
  105. package/chunk/{DDda6s72.js → BjSHZA0m.js} +6 -6
  106. package/chunk/{C7Okdv4u.js → Bpug_KxP.js} +1 -1
  107. package/chunk/BzPkh4Zv.js +11 -0
  108. package/chunk/{CwXmtKib.js → C1D7T29r.js} +35 -35
  109. package/chunk/{DYZzQ2uT.js → C1u_ckwU.js} +1 -1
  110. package/chunk/C1xMmQIZ.js +468 -0
  111. package/chunk/C2lIz2F9.js +60 -0
  112. package/chunk/{Be7oeWU8.js → C43Hv2Bl.js} +1 -1
  113. package/chunk/{CR4u270n.js → C5AQWbC4.js} +79 -79
  114. package/chunk/{fqgc8r6C.js → C9vsih_D.js} +1 -1
  115. package/chunk/CANaGbGR.js +154 -0
  116. package/chunk/{BA02BFUV.js → CAfR2wLq.js} +1 -1
  117. package/chunk/{CcX2pBUh.js → CAfecMDF.js} +1 -1
  118. package/chunk/{BHK9zpXn.js → CKp4rZnD.js} +1 -1
  119. package/chunk/CTxjmYmx.js +19 -0
  120. package/chunk/{BqxwlITu.js → CV2Aqv9q.js} +1 -1
  121. package/chunk/{bsawGxt8.js → CYdarMv9.js} +1 -1
  122. package/chunk/{DafaH1Qt.js → C_S5Mdvd.js} +43 -44
  123. package/chunk/{DkIjpuBZ.js → Cbd50gx8.js} +11 -11
  124. package/chunk/{D5p8q9Pa.js → CbiWdbr_.js} +12 -12
  125. package/chunk/{cUuQh7L_.js → CmB-TL7C.js} +1 -1
  126. package/chunk/{BbYzi8M0.js → CuOl4X0X.js} +4 -4
  127. package/chunk/{BHLTzWzi.js → D-ER56Sf.js} +1 -1
  128. package/chunk/{BK1FKNAX.js → D-aYnb6u.js} +1 -1
  129. package/chunk/{DalIRWr7.js → D2HkyI6A.js} +9 -9
  130. package/chunk/D3NFxdmG.js +518 -0
  131. package/chunk/{C2fspJbE.js → D3xQFJcO.js} +1 -1
  132. package/chunk/{Lk60-jkf.js → DApXtulb.js} +4 -0
  133. package/chunk/{sl8s35SK.js → DJcEys80.js} +1 -1
  134. package/chunk/{B1S1OEw6.js → DLIm6rRJ.js} +1 -1
  135. package/chunk/{C95ipQ6b.js → DOWEHtqM.js} +1 -1
  136. package/chunk/{aM2ePYrq.js → DSGRHf-1.js} +132 -132
  137. package/chunk/{D9TqtOhq.js → DT37l12z.js} +1 -1
  138. package/chunk/{B6fn5y_s.js → DW-B7npC.js} +1 -1
  139. package/chunk/D_-UD4vO.js +119 -0
  140. package/chunk/{Dtnux4qL.js → D_MTFBb0.js} +1 -1
  141. package/chunk/{WkB0MERB.js → DhBo0pPJ.js} +27 -27
  142. package/chunk/DmUhn9ib.js +961 -0
  143. package/chunk/{Bny52uiG.js → DpfUGhi4.js} +10 -10
  144. package/chunk/{DhLbnw3R.js → Dx_5J4fO.js} +1 -1
  145. package/chunk/{B9PsJar0.js → Dy487FZ1.js} +1 -1
  146. package/chunk/{D6RTBH4C.js → IooeSKJJ.js} +10 -10
  147. package/chunk/Kbr6FzOG.js +745 -0
  148. package/chunk/{CwjaGytU.js → RMBPs_Ry.js} +32 -32
  149. package/chunk/Uz-rNulO.js +98 -0
  150. package/chunk/V6euPXVB.js +1025 -0
  151. package/chunk/{Bv8ZRDFt.js → YIlBPVAs.js} +14 -14
  152. package/chunk/{DPvnQJ-H.js → cDZI_t6o.js} +1 -1
  153. package/chunk/{C-w9pFY-.js → cZiP8FvM.js} +3 -3
  154. package/chunk/{DJmWXheU.js → eK7lxdak.js} +8 -8
  155. package/chunk/{Dg2DmtzA.js → gIbzjQ-X.js} +5 -6
  156. package/chunk/{CPl52AZh.js → sScV-J56.js} +1 -1
  157. package/chunk/{BbI3gqVr.js → wI2I1qb0.js} +1 -1
  158. package/hooks/index.js +32 -32
  159. package/hooks/use-verification-code.js +23 -22
  160. package/hooks/use-watermark.js +2 -1
  161. package/hooks/useComputedState.js +2 -1
  162. package/hooks/useCreate.js +2 -1
  163. package/hooks/useForceUpdate.js +2 -1
  164. package/hooks/useId.js +2 -1
  165. package/hooks/useInView.js +5 -4
  166. package/hooks/useIntersectionObserver.js +11 -11
  167. package/hooks/useIsFirstRender.js +2 -1
  168. package/hooks/useIsomorphicLayoutEffect.js +2 -1
  169. package/hooks/useKeyboardEvent.js +3 -2
  170. package/hooks/useMedia.js +2 -1
  171. package/hooks/useMergeProps.js +2 -1
  172. package/hooks/useMergeValue.js +4 -3
  173. package/hooks/useOverflowHidden.js +2 -1
  174. package/hooks/useOverrideRef.js +2 -1
  175. package/hooks/usePersistCallback.js +2 -1
  176. package/hooks/usePrevious.js +2 -1
  177. package/hooks/useRefs.js +2 -1
  178. package/hooks/useResizeObserver.js +2 -1
  179. package/hooks/useStateCallback.js +2 -1
  180. package/hooks/useStateWithPromise.js +2 -1
  181. package/hooks/useUpdateEffect.js +2 -1
  182. package/hooks/useWatch.js +3 -2
  183. package/hooks/useWindowSize.js +2 -1
  184. package/icons.js +35 -35
  185. package/index.js +484 -376
  186. package/locale/en-US.js +3 -11
  187. package/locale/tr-TR.js +3 -11
  188. package/package.json +1 -1
  189. package/style.css +1 -1
  190. package/types/anchor/Anchor.d.ts +1 -1
  191. package/types/button/index.d.ts +3 -2
  192. package/types/color-picker/hooks/useColorPicker.d.ts +1 -1
  193. package/types/color-picker/hooks/useControlBlock.d.ts +1 -1
  194. package/types/config-provider/interface.d.ts +1 -0
  195. package/types/date-picker/PickerRange.d.ts +1 -1
  196. package/types/hooks/use-verification-code/index.d.ts +2 -1
  197. package/types/hooks/use-watermark/index.d.ts +2 -1
  198. package/types/hooks/useComputedState.d.ts +2 -2
  199. package/types/hooks/useCreate.d.ts +2 -1
  200. package/types/hooks/useForceUpdate.d.ts +2 -1
  201. package/types/hooks/useId.d.ts +2 -1
  202. package/types/hooks/useInView.d.ts +1 -1
  203. package/types/hooks/useIntersectionObserver.d.ts +1 -1
  204. package/types/hooks/useIsFirstRender.d.ts +2 -1
  205. package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -1
  206. package/types/hooks/useKeyboardEvent.d.ts +2 -2
  207. package/types/hooks/useMedia.d.ts +1 -1
  208. package/types/hooks/useMergeProps.d.ts +2 -1
  209. package/types/hooks/useMergeValue.d.ts +2 -1
  210. package/types/hooks/useOverflowHidden.d.ts +2 -2
  211. package/types/hooks/useOverrideRef.d.ts +2 -1
  212. package/types/hooks/usePersistCallback.d.ts +2 -1
  213. package/types/hooks/usePrevious.d.ts +2 -1
  214. package/types/hooks/useRefs.d.ts +2 -1
  215. package/types/hooks/useResizeObserver.d.ts +2 -1
  216. package/types/hooks/useStateCallback.d.ts +1 -1
  217. package/types/hooks/useStateWithPromise.d.ts +1 -1
  218. package/types/hooks/useUpdateEffect.d.ts +2 -1
  219. package/types/hooks/useWatch.d.ts +2 -1
  220. package/types/hooks/useWindowSize.d.ts +1 -1
  221. package/types/image/interface.d.ts +1 -1
  222. package/types/index.d.ts +13 -22
  223. package/types/table/interface.d.ts +3 -1
  224. package/types/upload/Upload.d.ts +2 -1
  225. package/types/upload/index.d.ts +3 -1
  226. package/types/upload/request_.d.ts +3 -0
  227. package/types/utils/caseName.d.ts +2 -0
  228. package/types/utils/fileToURL.d.ts +2 -0
  229. package/types/utils/fillNBSP.d.ts +1 -1
  230. package/types/utils/index.d.ts +37 -0
  231. package/types/utils/is.d.ts +2 -2
  232. package/types/utils/lodash.d.ts +4 -0
  233. package/types/utils/scrollIntoView.d.ts +2 -1
  234. package/types/version/index.d.ts +1 -1
  235. package/utils/CSSTransition.js +1 -1
  236. package/utils/caseName.js +20 -0
  237. package/utils/className.js +1 -1
  238. package/utils/contextHolder.js +1 -1
  239. package/utils/fileToURL.js +4 -0
  240. package/utils/index.js +219 -0
  241. package/utils/is.js +95 -93
  242. package/utils/keyCode.js +10 -46
  243. package/utils/lodash.js +8 -0
  244. package/utils/mergedToString.js +11 -10
  245. package/utils/reactDOM.js +1 -1
  246. package/utils/saveAs.js +1 -1
  247. package/utils/scrollIntoView.js +8 -7
  248. package/chunk/5pZ3ayqs.js +0 -29
  249. package/chunk/Bl-ODC57.js +0 -945
  250. package/chunk/BlKc_pDZ.js +0 -678
  251. package/chunk/CiEln_Q1.js +0 -517
  252. package/chunk/CiZVOdJ3.js +0 -122
  253. package/chunk/DMWMrXg1.js +0 -964
  254. package/chunk/DUxWiN2U.js +0 -1465
  255. package/chunk/Dbk4DVhB.js +0 -855
  256. package/chunk/Do1aMgY3.js +0 -12
  257. package/chunk/HlP8inLK.js +0 -1796
  258. package/chunk/V_IcWDFx.js +0 -49
  259. /package/types/utils/{mergeProp.d.ts → mergeProps.d.ts} +0 -0
  260. /package/utils/{mergeProp.js → mergeProps.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
2
  import i from "react";
3
- import { u as s } from "./B45v5S9k.js";
3
+ import { u as s } from "./BHn4xgbv.js";
4
4
  const h = i.forwardRef(function(t, r) {
5
5
  const e = s({ ...t, name: "ui-to-top" });
6
6
  return /* @__PURE__ */ n(
@@ -1,9 +1,9 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { forwardRef as l, useContext as u, useRef as p, useCallback as d, useEffect as C } from "react";
3
- import { b as h } from "./DUxWiN2U.js";
4
- import x from "../hooks/use-watermark.js";
5
- import k from "../hooks/useMergeProps.js";
6
- import { y } from "./Do1aMgY3.js";
3
+ import { d as h } from "./Bdh4XVuf.js";
4
+ import { useWatermark as x } from "../hooks/use-watermark.js";
5
+ import { useMergeProps as k } from "../hooks/useMergeProps.js";
6
+ import { y } from "./BzPkh4Zv.js";
7
7
  const w = {}, W = [
8
8
  "zIndex",
9
9
  "width",
@@ -59,7 +59,7 @@ function N(c, O) {
59
59
  }
60
60
  ) : null;
61
61
  }
62
- const I = l(N);
62
+ const $ = l(N);
63
63
  export {
64
- I as W
64
+ $ as W
65
65
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
2
  import n from "react";
3
- import { u as s } from "./B45v5S9k.js";
3
+ import { u as s } from "./BHn4xgbv.js";
4
4
  const u = n.forwardRef(function(o, t) {
5
5
  const r = s({ ...o, name: "ui-eye" });
6
6
  return /* @__PURE__ */ i(
@@ -0,0 +1,11 @@
1
+ import m from "lodash/isArray";
2
+ import n from "lodash/isPlainObject";
3
+ import f from "lodash/isString";
4
+ import l from "lodash/uniq";
5
+ function b(...t) {
6
+ const r = " ", i = t.map((o, p, s) => n(o) ? Object.keys(o).filter((e) => o[e]) : (f(o) || m(o), o)).flat(1 / 0).filter(Boolean).join(r).split(r).filter(Boolean);
7
+ return l(i).join(r);
8
+ }
9
+ export {
10
+ b as y
11
+ };
@@ -5,30 +5,30 @@ import { jsx as i, jsxs as V } from "react/jsx-runtime";
5
5
  import We from "lodash/isArray";
6
6
  import Lt from "lodash/isPlainObject";
7
7
  import Ze from "lodash/isUndefined";
8
- import ie, { useContext as Pe, forwardRef as Ne, createContext as $t, useState as M, useRef as U, useMemo as Se, useImperativeHandle as je, useCallback as At, useEffect as A } from "react";
9
- import Ut from "../hooks/useIsFirstRender.js";
10
- import Me from "../hooks/useMergeValue.js";
11
- import { I as Be, e as Tt } from "./B45v5S9k.js";
12
- import { I as Rt } from "./BCk8e9fj.js";
13
- import { a as zt, b as Et, c as Dt, d as Ot, e as Vt, f as Yt } from "./CPl52AZh.js";
14
- import { a as He, I as _e } from "./D9TqtOhq.js";
15
- import { b as qe, C as Ft } from "./DUxWiN2U.js";
8
+ import ie, { useContext as Pe, forwardRef as Ne, createContext as At, useState as M, useRef as U, useMemo as Se, useImperativeHandle as je, useCallback as $t, useEffect as $ } from "react";
9
+ import { useIsFirstRender as Ut } from "../hooks/useIsFirstRender.js";
10
+ import { useMergeValue as Me } from "../hooks/useMergeValue.js";
11
+ import { I as Be, e as Tt } from "./BHn4xgbv.js";
12
+ import { I as Rt } from "./B7Zsp3gO.js";
13
+ import { a as zt, b as Et, c as Dt, d as Ot, e as Vt, f as Yt } from "./sScV-J56.js";
14
+ import { a as He, I as _e } from "./DT37l12z.js";
15
+ import { d as qe, a as Ft } from "./Bdh4XVuf.js";
16
16
  import "lodash/isEqualWith";
17
17
  import "../utils/is.js";
18
- import { ArrowDown as Xt, ArrowUp as Bt, ArrowLeft as Gt, ArrowRight as Wt, Esc as Zt } from "../utils/keyCode.js";
18
+ import { A as Xt, c as Bt, a as Gt, b as Wt, d as Zt } from "./C2lIz2F9.js";
19
19
  import "lodash/isNumber";
20
20
  import "lodash/merge";
21
21
  import { isServerRendering as jt, on as Ce, off as Ie } from "../utils/dom.js";
22
22
  import "../hooks/useIntersectionObserver.js";
23
- import Ht from "../hooks/useMergeProps.js";
24
- import _t from "../hooks/useOverflowHidden.js";
23
+ import { useMergeProps as Ht } from "../hooks/useMergeProps.js";
24
+ import { useOverflowHidden as _t } from "../hooks/useOverflowHidden.js";
25
25
  import { findDOMNode as qt } from "../utils/reactDOM.js";
26
- import Kt from "../hooks/useUpdateEffect.js";
26
+ import { useUpdateEffect as Kt } from "../hooks/useUpdateEffect.js";
27
27
  import Jt from "../Portal.js";
28
- import { P as Ge } from "./BP7xX86Q.js";
29
- import { y as Y } from "./Do1aMgY3.js";
28
+ import { P as Ge } from "./BPZ-6HKJ.js";
29
+ import { y as Y } from "./BzPkh4Zv.js";
30
30
  import { s as Qt } from "./Cb_oWoGj.js";
31
- import { I as en } from "./BK1FKNAX.js";
31
+ import { I as en } from "./D-aYnb6u.js";
32
32
  import tn from "../Tooltip.js";
33
33
  import nn from "../Trigger.js";
34
34
  const on = (s) => {
@@ -160,7 +160,7 @@ const sn = (s, t) => {
160
160
  );
161
161
  }, an = Ne(
162
162
  sn
163
- ), Ke = $t({
163
+ ), Ke = At({
164
164
  previewGroup: !1,
165
165
  previewUrlMap: /* @__PURE__ */ new Map(),
166
166
  previewPropsMap: /* @__PURE__ */ new Map(),
@@ -322,7 +322,7 @@ function mn(s, t) {
322
322
  pageY: 0,
323
323
  originX: 0,
324
324
  originY: 0
325
- }), { isLoading: tt, isLoaded: nt, setStatus: ce } = un("loading"), [ot, rt] = M(!1), [$, le] = M({ x: 0, y: 0 }), [g, ue] = M(1), [$e, Ae] = M(!1), [te, fe] = M(0), [O, Ue] = M(!1), W = Se(() => new ln(z), []), {
325
+ }), { isLoading: tt, isLoaded: nt, setStatus: ce } = un("loading"), [ot, rt] = M(!1), [A, le] = M({ x: 0, y: 0 }), [g, ue] = M(1), [Ae, $e] = M(!1), [te, fe] = M(0), [O, Ue] = M(!1), W = Se(() => new ln(z), []), {
326
326
  onLoad: me,
327
327
  onError: de,
328
328
  onMouseDown: pe,
@@ -337,8 +337,8 @@ function mn(s, t) {
337
337
  reset: ge,
338
338
  getRootDOMNode: () => Le.current
339
339
  }));
340
- const [ne, ct] = M(), ze = At(() => ne, [ne]);
341
- A(() => {
340
+ const [ne, ct] = M(), ze = $t(() => ne, [ne]);
341
+ $(() => {
342
342
  const e = C == null ? void 0 : C(), a = qt(e) || document.body;
343
343
  ct(a);
344
344
  }, [C]), _t(ze, { hidden: h });
@@ -363,8 +363,8 @@ function mn(s, t) {
363
363
  fe((te + ke) % 360);
364
364
  }
365
365
  const we = U(null), mt = () => {
366
- !$e && Ae(!0), we.current && clearTimeout(we.current), we.current = setTimeout(() => {
367
- Ae(!1);
366
+ !Ae && $e(!0), we.current && clearTimeout(we.current), we.current = setTimeout(() => {
367
+ $e(!1);
368
368
  }, 1e3);
369
369
  }, oe = (e) => {
370
370
  g !== e && (ue(e), mt());
@@ -413,11 +413,11 @@ function mn(s, t) {
413
413
  const e = S.current.getBoundingClientRect(), a = _.current.getBoundingClientRect(), [w, q] = cn(
414
414
  e,
415
415
  a,
416
- $.x,
417
- $.y,
416
+ A.x,
417
+ A.y,
418
418
  g
419
419
  );
420
- (w !== $.x || q !== $.y) && le({
420
+ (w !== A.x || q !== A.y) && le({
421
421
  x: w,
422
422
  y: q
423
423
  });
@@ -445,21 +445,21 @@ function mn(s, t) {
445
445
  var w;
446
446
  (w = e.preventDefault) == null || w.call(e), Ue(!0);
447
447
  const a = e.type === "touchstart" ? e.touches[0] : e;
448
- K.current.pageX = a.pageX, K.current.pageY = a.pageY, K.current.originX = $.x, K.current.originY = $.y, pe == null || pe(e);
448
+ K.current.pageX = a.pageX, K.current.pageY = a.pageY, K.current.originX = A.x, K.current.originY = A.y, pe == null || pe(e);
449
449
  };
450
- A(() => (h && O && (Ce(document, "mousemove", Ye, !1), Ce(document, "mouseup", Fe, !1)), () => {
450
+ $(() => (h && O && (Ce(document, "mousemove", Ye, !1), Ce(document, "mouseup", Fe, !1)), () => {
451
451
  Ie(document, "mousemove", Ye, !1), Ie(document, "mouseup", Fe, !1);
452
- }), [h, O]), A(() => {
452
+ }), [h, O]), $(() => {
453
453
  J && !O && Ve();
454
- }, [O, $]), A(() => {
454
+ }, [O, A]), $(() => {
455
455
  J && Ve();
456
- }, [g]), A(() => {
456
+ }, [g]), $(() => {
457
457
  h && ge();
458
- }, [h]), A(() => {
458
+ }, [h]), $(() => {
459
459
  Q(H), ce(H ? "loading" : "loaded"), ge();
460
460
  }, [H]), Kt(() => {
461
461
  W.updateScale(z), ue(1);
462
- }, [z]), A(() => {
462
+ }, [z]), $(() => {
463
463
  const e = (a) => {
464
464
  if (a)
465
465
  switch (a.key) {
@@ -551,7 +551,7 @@ function mn(s, t) {
551
551
  onClick: Oe
552
552
  }
553
553
  ].filter(Boolean);
554
- A(() => {
554
+ $(() => {
555
555
  let e;
556
556
  return S.current && (e = new ResizeObserver(wt), e.observe(S.current)), () => {
557
557
  var a, w;
@@ -569,7 +569,7 @@ function mn(s, t) {
569
569
  }),
570
570
  style: {
571
571
  ...it,
572
- transform: `translate(${$.x}px, ${$.y}px) rotate(${te}deg)`
572
+ transform: `translate(${A.x}px, ${A.y}px) rotate(${te}deg)`
573
573
  },
574
574
  src: G,
575
575
  ...at,
@@ -639,7 +639,7 @@ function mn(s, t) {
639
639
  /* @__PURE__ */ i(
640
640
  Ge,
641
641
  {
642
- in: $e,
642
+ in: Ae,
643
643
  timeout: 400,
644
644
  appear: !0,
645
645
  classNames: "fadeImage",
@@ -717,7 +717,7 @@ function dn(s, t) {
717
717
  ), k = Ut(), L = () => f ? new Map(f) : /* @__PURE__ */ new Map(), [R, C] = M(L()), P = U(), z = P.current || /* @__PURE__ */ new Map(), E = (l) => {
718
718
  P.current = l(P.current);
719
719
  };
720
- A(() => {
720
+ $(() => {
721
721
  k || C(L());
722
722
  }, [f]);
723
723
  const j = new Map(
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import i from "react";
3
- import { u as n } from "./B45v5S9k.js";
3
+ import { u as n } from "./BHn4xgbv.js";
4
4
  const h = i.forwardRef(function(e, r) {
5
5
  const t = n({ ...e, name: "ui-file" });
6
6
  return /* @__PURE__ */ o(
@@ -0,0 +1,468 @@
1
+ import { V, G as b, z as w } from "./BBVjSFnw.js";
2
+ import c from "lodash/isObject";
3
+ import M from "lodash/isArray";
4
+ import E from "lodash/isEqual";
5
+ import O from "lodash/isBoolean";
6
+ import z from "lodash/isNumber";
7
+ import y from "lodash/isString";
8
+ import S from "lodash/isFunction";
9
+ var _ = Object.defineProperty, $ = (r, t, e) => t in r ? _(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, o = (r, t, e) => $(r, typeof t != "symbol" ? t + "" : t, e);
10
+ const d = "#{field} is not a #{type} type", k = {
11
+ required: "#{field} is required",
12
+ type: {
13
+ ip: d,
14
+ email: d,
15
+ url: d,
16
+ string: d,
17
+ number: d,
18
+ array: d,
19
+ object: d,
20
+ boolean: d
21
+ },
22
+ number: {
23
+ min: "`#{value}` is not greater than `#{min}`",
24
+ max: "`#{value}` is not less than `#{max}`",
25
+ equal: "`#{value}` is not equal to `#{equal}`",
26
+ range: "`#{value}` is not in range `#{min} ~ #{max}`",
27
+ positive: "`#{value}` is not a positive number",
28
+ negative: "`#{value}` is not a negative number"
29
+ },
30
+ string: {
31
+ maxLength: "#{field} cannot be longer than #{maxLength} characters",
32
+ minLength: "#{field} must be at least #{minLength} characters",
33
+ length: "#{field} must be exactly #{length} characters",
34
+ match: "`#{value}` does not match pattern #{pattern}",
35
+ uppercase: "`#{value}` must be all uppercase",
36
+ lowercase: "`#{value}` must be all lowercased"
37
+ },
38
+ array: {
39
+ length: "#{field} must be exactly #{length} in length",
40
+ minLength: "#{field} cannot be less than #{minLength} in length",
41
+ maxLength: "#{field} cannot be greater than #{maxLength} in length",
42
+ includes: "#{field} is not includes #{includes}",
43
+ deepEqual: "#{field} is not deep equal with #{deepEqual}",
44
+ empty: "#{field} is not an empty array"
45
+ },
46
+ object: {
47
+ deepEqual: "#{field} is not deep equal to expected value",
48
+ hasKeys: "#{field} does not contain required fields",
49
+ empty: "#{field} is not an empty object"
50
+ },
51
+ boolean: {
52
+ true: "Expect true but got `#{value}`",
53
+ false: "Expect false but got `#{value}`"
54
+ }
55
+ }, x = (r, t) => {
56
+ const e = { ...r };
57
+ return Object.keys(t || {}).forEach((s) => {
58
+ const i = e[s], l = t == null ? void 0 : t[s];
59
+ e[s] = c(i) ? {
60
+ ...i,
61
+ ...l
62
+ } : l || i;
63
+ }), e;
64
+ }, C = (r, t) => {
65
+ const e = t.split(".");
66
+ let s = r;
67
+ for (let i = 0; i < e.length; i++)
68
+ if (s = s && s[e[i]], s === void 0)
69
+ return s;
70
+ return s;
71
+ };
72
+ class p {
73
+ constructor(t, e) {
74
+ o(this, "obj"), o(this, "message"), o(this, "type"), o(this, "error"), o(this, "_not"), o(this, "validateMessages"), o(this, "field"), o(this, "getValidateMsg", (s, i = {}) => {
75
+ const l = {
76
+ ...i,
77
+ value: this.obj,
78
+ field: this.field,
79
+ type: this.type
80
+ }, a = C(this.validateMessages, s);
81
+ return S(a) ? a(l) : y(a) ? a.replace(/\#\{.+?\}/g, (u) => {
82
+ const h = u.slice(2, -1);
83
+ if (h in l) {
84
+ if (c(l[h]) || M(l[h]))
85
+ try {
86
+ return JSON.stringify(l[h]);
87
+ } catch {
88
+ return l[h];
89
+ }
90
+ return String(l[h]);
91
+ }
92
+ return u;
93
+ }) : a;
94
+ }), c(e) && y(t) && e.trim ? this.obj = t.trim() : c(e) && e.ignoreEmptyString && t === "" ? this.obj = void 0 : this.obj = t, this.message = e.message, this.type = e.type, this.error = null, this.field = e.field || e.type, this.validateMessages = x(
95
+ k,
96
+ e.validateMessages
97
+ );
98
+ }
99
+ get not() {
100
+ return this._not = !this._not, this;
101
+ }
102
+ get isRequired() {
103
+ if (b(this.obj) || V(this.obj)) {
104
+ const t = this.getValidateMsg("required");
105
+ this.error = {
106
+ value: this.obj,
107
+ type: this.type,
108
+ requiredError: !0,
109
+ message: this.message || (c(t) ? t : `${this._not ? "[NOT MODE]:" : ""}${t}`)
110
+ };
111
+ }
112
+ return this;
113
+ }
114
+ get end() {
115
+ return this.error;
116
+ }
117
+ addError(t) {
118
+ !this.error && t && (this.error = {
119
+ value: this.obj,
120
+ type: this.type,
121
+ message: this.message || (c(t) ? t : `${this._not ? "[NOT MODE]:" : ""}${t}`)
122
+ });
123
+ }
124
+ validate(t, e) {
125
+ return (this._not ? t : !t) && this.addError(e), this;
126
+ }
127
+ collect(t) {
128
+ t && t(this.error);
129
+ }
130
+ }
131
+ class A extends p {
132
+ constructor(t, e) {
133
+ super(t, {
134
+ ...e,
135
+ type: "array"
136
+ }), this.validate(
137
+ e && e.strict ? M(this.obj) : !0,
138
+ this.getValidateMsg("type.array", { value: this.obj, type: this.type })
139
+ );
140
+ }
141
+ length(t) {
142
+ return this.obj ? this.validate(
143
+ this.obj.length === t,
144
+ this.getValidateMsg("array.length", { value: this.obj, length: t })
145
+ ) : this;
146
+ }
147
+ minLength(t) {
148
+ return this.obj ? this.validate(
149
+ this.obj.length >= t,
150
+ this.getValidateMsg("array.minLength", {
151
+ value: this.obj,
152
+ minLength: t
153
+ })
154
+ ) : this;
155
+ }
156
+ maxLength(t) {
157
+ return this.obj ? this.validate(
158
+ this.obj.length <= t,
159
+ this.getValidateMsg("array.maxLength", {
160
+ value: this.obj,
161
+ maxLength: t
162
+ })
163
+ ) : this;
164
+ }
165
+ includes(t) {
166
+ return this.obj ? this.validate(
167
+ t.every((e) => this.obj.indexOf(e) !== -1),
168
+ this.getValidateMsg("array.includes", {
169
+ value: this.obj,
170
+ includes: t
171
+ })
172
+ ) : this;
173
+ }
174
+ deepEqual(t) {
175
+ return this.obj ? this.validate(
176
+ E(this.obj, t),
177
+ this.getValidateMsg("array.deepEqual", {
178
+ value: this.obj,
179
+ deepEqual: t
180
+ })
181
+ ) : this;
182
+ }
183
+ get empty() {
184
+ return this.validate(
185
+ V(this.obj),
186
+ this.getValidateMsg("array.empty", { value: this.obj })
187
+ );
188
+ }
189
+ }
190
+ class N extends p {
191
+ constructor(t, e) {
192
+ super(t, {
193
+ ...e,
194
+ type: "boolean"
195
+ }), this.validate(
196
+ e && e.strict ? O(this.obj) : !0,
197
+ this.getValidateMsg("type.boolean")
198
+ );
199
+ }
200
+ get true() {
201
+ return this.validate(
202
+ this.obj === !0,
203
+ this.getValidateMsg("boolean.true")
204
+ );
205
+ }
206
+ get false() {
207
+ return this.validate(
208
+ this.obj === !1,
209
+ this.getValidateMsg("boolean.false")
210
+ );
211
+ }
212
+ }
213
+ class R extends p {
214
+ constructor(t, e) {
215
+ super(t, {
216
+ ...e,
217
+ type: "custom"
218
+ });
219
+ }
220
+ // @ts-ignore
221
+ get validate() {
222
+ const t = this;
223
+ return function(e, s) {
224
+ let i;
225
+ if (e)
226
+ return i = e(t.obj, t.addError.bind(t)), i && i.then ? (s && i.then(
227
+ () => {
228
+ s && s(t.error);
229
+ },
230
+ (l) => {
231
+ console.error(l);
232
+ }
233
+ ), [i, t]) : (s && s(t.error), t.error);
234
+ };
235
+ }
236
+ }
237
+ class K extends p {
238
+ constructor(t, e) {
239
+ super(t, {
240
+ ...e,
241
+ type: "number"
242
+ }), this.validate(
243
+ e && e.strict ? z(this.obj) : !0,
244
+ this.getValidateMsg("type.number")
245
+ );
246
+ }
247
+ min(t) {
248
+ return b(this.obj) ? this : this.validate(
249
+ this.obj >= t,
250
+ this.getValidateMsg("number.min", { min: t })
251
+ );
252
+ }
253
+ max(t) {
254
+ return b(this.obj) ? this : this.validate(
255
+ this.obj <= t,
256
+ this.getValidateMsg("number.max", { max: t })
257
+ );
258
+ }
259
+ equal(t) {
260
+ return b(this.obj) ? this : this.validate(
261
+ this.obj === t,
262
+ this.getValidateMsg("number.equal", { equal: t })
263
+ );
264
+ }
265
+ range(t, e) {
266
+ return b(this.obj) ? this : this.validate(
267
+ this.obj >= t && this.obj <= e,
268
+ this.getValidateMsg("number.range", { min: t, max: e })
269
+ );
270
+ }
271
+ get positive() {
272
+ return b(this.obj) ? this : this.validate(this.obj > 0, this.getValidateMsg("number.positive"));
273
+ }
274
+ get negative() {
275
+ return b(this.obj) ? this : this.validate(this.obj < 0, this.getValidateMsg("number.negative"));
276
+ }
277
+ }
278
+ class D extends p {
279
+ constructor(t, e) {
280
+ super(t, {
281
+ ...e,
282
+ type: "object"
283
+ }), this.validate(
284
+ e && e.strict ? c(this.obj) : !0,
285
+ this.getValidateMsg("type.object")
286
+ );
287
+ }
288
+ deepEqual(t) {
289
+ return this.obj ? this.validate(
290
+ E(this.obj, t),
291
+ this.getValidateMsg("object.deepEqual", { deepEqual: t })
292
+ ) : this;
293
+ }
294
+ hasKeys(t) {
295
+ return this.obj ? this.validate(
296
+ t.every((e) => this.obj[e]),
297
+ this.getValidateMsg("object.hasKeys", { keys: t })
298
+ ) : this;
299
+ }
300
+ get empty() {
301
+ return this.validate(
302
+ w(this.obj),
303
+ this.getValidateMsg("object.empty")
304
+ );
305
+ }
306
+ }
307
+ class P extends p {
308
+ constructor(t, e) {
309
+ super(t, {
310
+ ...e,
311
+ type: "string"
312
+ }), this.validate(
313
+ e && e.strict ? y(this.obj) : !0,
314
+ this.getValidateMsg("type.string")
315
+ );
316
+ }
317
+ maxLength(t) {
318
+ return this.obj ? this.validate(
319
+ this.obj.length <= t,
320
+ this.getValidateMsg("string.maxLength", { maxLength: t })
321
+ ) : this;
322
+ }
323
+ minLength(t) {
324
+ return this.obj ? this.validate(
325
+ this.obj.length >= t,
326
+ this.getValidateMsg("string.minLength", { minLength: t })
327
+ ) : this;
328
+ }
329
+ length(t) {
330
+ return this.obj ? this.validate(
331
+ this.obj.length === t,
332
+ this.getValidateMsg("string.length", { length: t })
333
+ ) : this;
334
+ }
335
+ match(t) {
336
+ const e = t instanceof RegExp;
337
+ return e && (t.lastIndex = 0), this.validate(
338
+ this.obj === void 0 || e && t.test(this.obj),
339
+ this.getValidateMsg("string.match", { pattern: t })
340
+ );
341
+ }
342
+ get uppercase() {
343
+ return this.obj ? this.validate(
344
+ this.obj.toUpperCase() === this.obj,
345
+ this.getValidateMsg("string.uppercase")
346
+ ) : this;
347
+ }
348
+ get lowercase() {
349
+ return this.obj ? this.validate(
350
+ this.obj.toLowerCase() === this.obj,
351
+ this.getValidateMsg("string.lowercase")
352
+ ) : this;
353
+ }
354
+ }
355
+ const T = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, Z = new RegExp(
356
+ "^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
357
+ "i"
358
+ ), F = /^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/;
359
+ class G extends p {
360
+ constructor(t, e) {
361
+ super(t, {
362
+ ...e,
363
+ type: "type"
364
+ });
365
+ }
366
+ get email() {
367
+ return this.type = "email", this.validate(
368
+ this.obj === void 0 || T.test(this.obj),
369
+ this.getValidateMsg("type.email")
370
+ );
371
+ }
372
+ get url() {
373
+ return this.type = "url", this.validate(
374
+ this.obj === void 0 || Z.test(this.obj),
375
+ this.getValidateMsg("type.url")
376
+ );
377
+ }
378
+ get ip() {
379
+ return this.type = "ip", this.validate(
380
+ this.obj === void 0 || F.test(this.obj),
381
+ this.getValidateMsg("type.ip")
382
+ );
383
+ }
384
+ }
385
+ const m = (r, t) => new q(r, { field: "value", ...t });
386
+ m.globalConfig = {};
387
+ m.setGlobalConfig = (r) => {
388
+ m.globalConfig = r || {};
389
+ };
390
+ class q {
391
+ constructor(t, e) {
392
+ o(this, "number"), o(this, "string"), o(this, "array"), o(this, "object"), o(this, "boolean"), o(this, "type"), o(this, "custom");
393
+ const s = m.globalConfig, i = {
394
+ ...s,
395
+ ...e,
396
+ validateMessages: x(
397
+ s.validateMessages,
398
+ e.validateMessages
399
+ )
400
+ };
401
+ this.string = new P(t, i), this.number = new K(t, i), this.array = new A(t, i), this.object = new D(t, i), this.boolean = new N(t, i), this.type = new G(t, i), this.custom = new R(t, i);
402
+ }
403
+ }
404
+ class X {
405
+ constructor(t, e = {}) {
406
+ o(this, "schema"), o(this, "options"), this.schema = t, this.options = e;
407
+ }
408
+ // 更新校验信息
409
+ messages(t) {
410
+ this.options = {
411
+ ...this.options,
412
+ validateMessages: x(
413
+ this.options.validateMessages,
414
+ t
415
+ )
416
+ };
417
+ }
418
+ validate(t, e) {
419
+ if (!c(t))
420
+ return;
421
+ const s = [];
422
+ let i = null;
423
+ function l(a, u) {
424
+ i || (i = {}), (!i[a] || u.requiredError) && (i[a] = u);
425
+ }
426
+ this.schema && Object.keys(this.schema).forEach((a) => {
427
+ if (M(this.schema[a]))
428
+ for (let u = 0; u < this.schema[a].length; u++) {
429
+ const h = this.schema[a][u], v = h.type, L = h.message;
430
+ if (!v && !h.validator)
431
+ throw `You must specify a type to field ${a}!`;
432
+ const f = {
433
+ ...this.options,
434
+ message: L,
435
+ field: a
436
+ };
437
+ "ignoreEmptyString" in h && (f.ignoreEmptyString = h.ignoreEmptyString), "strict" in h && (f.strict = h.strict);
438
+ const j = new q(t[a], f);
439
+ let n = j.type[v] || null;
440
+ if (!n)
441
+ if (h.validator) {
442
+ n = j.custom.validate(h.validator), Object.prototype.toString.call(n) === "[object Array]" && n[0].then ? s.push({
443
+ function: n[0],
444
+ _this: n[1],
445
+ key: a
446
+ }) : n && l(a, n);
447
+ continue;
448
+ } else
449
+ n = j[v];
450
+ if (Object.keys(h).forEach((g) => {
451
+ h.required && (n = n.isRequired), g !== "message" && n[g] && h[g] && typeof n[g] == "object" && (n = n[g]), n[g] && h[g] !== void 0 && typeof n[g] == "function" && (n = n[g](h[g]));
452
+ }), n.collect((g) => {
453
+ g && l(a, g);
454
+ }), i)
455
+ break;
456
+ }
457
+ }), s.length > 0 ? Promise.all(s.map((a) => a.function)).then(() => {
458
+ s.forEach((a) => {
459
+ a._this.error && l(a.key, a._this.error);
460
+ }), e && e(i);
461
+ }) : e && e(i);
462
+ }
463
+ }
464
+ export {
465
+ X as P,
466
+ m as p,
467
+ k as z
468
+ };