@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
@@ -0,0 +1,518 @@
1
+ import { jsx as P, jsxs as kt, Fragment as At } from "react/jsx-runtime";
2
+ import Ot from "lodash/isFunction";
3
+ import xt from "lodash/isNumber";
4
+ import it, { useRef as w, useState as Ut, useMemo as Vt, useEffect as N, useImperativeHandle as Dt } from "react";
5
+ import { useForceUpdate as Ft } from "../hooks/useForceUpdate.js";
6
+ import { useIsFirstRender as Kt } from "../hooks/useIsFirstRender.js";
7
+ import { useIsomorphicLayoutEffect as jt } from "../hooks/useIsomorphicLayoutEffect.js";
8
+ import { usePrevious as Bt } from "../hooks/usePrevious.js";
9
+ import { useStateWithPromise as Yt } from "../hooks/useStateWithPromise.js";
10
+ import { caf as yt, raf as lt } from "../utils/raf.js";
11
+ import Gt from "../utils/getStringLength.js";
12
+ import { findDOMNode as Wt } from "../utils/reactDOM.js";
13
+ const Ht = ({
14
+ height: l,
15
+ offset: o,
16
+ children: i,
17
+ outerStyle: e,
18
+ innerStyle: c
19
+ }) => {
20
+ let r = {}, f = {
21
+ display: "flex",
22
+ flexDirection: "column"
23
+ };
24
+ return o !== void 0 ? (r = {
25
+ height: l,
26
+ position: "relative",
27
+ overflow: "hidden",
28
+ zIndex: 0,
29
+ ...e
30
+ }, f = {
31
+ ...f,
32
+ transform: `translateY(${o}px)`,
33
+ position: "absolute",
34
+ left: 0,
35
+ right: 0,
36
+ top: 0,
37
+ ...c
38
+ }) : (r = { ...e }, f = { ...f, ...c }), /* @__PURE__ */ P("div", { style: r, children: /* @__PURE__ */ P("div", { style: f, children: i }) });
39
+ };
40
+ function $t(l, o, i, e) {
41
+ const c = i - l, r = o - i, f = Math.min(c, r) * 2;
42
+ if (e <= f) {
43
+ const H = Math.floor(e / 2);
44
+ return e % 2 ? i + H + 1 : i - H;
45
+ }
46
+ return c > r ? i - (e - r) : i + (e - c);
47
+ }
48
+ function Xt(l, o, i) {
49
+ const e = l.length, c = o.length;
50
+ let r, f;
51
+ if (e === 0 && c === 0)
52
+ return null;
53
+ e < c ? (r = l, f = o) : (r = o, f = l);
54
+ const H = { __EMPTY_ITEM__: !0 };
55
+ function _(I, v) {
56
+ return I !== void 0 ? i(I, v) : H;
57
+ }
58
+ let R = null, T = Math.abs(e - c) !== 1;
59
+ for (let I = 0; I < f.length; I += 1) {
60
+ const v = _(r[I], I), F = _(f[I], I);
61
+ if (v !== F) {
62
+ R = I, T = T || v !== _(f[I + 1], I + 1);
63
+ break;
64
+ }
65
+ }
66
+ return R === null ? null : { index: R, multiple: T };
67
+ }
68
+ const qt = "__rc_ghost_item__";
69
+ function Et(l, o) {
70
+ const i = Math.floor(l * o), e = i / o, c = (l - e) / (1 / o);
71
+ return {
72
+ index: i,
73
+ // scrollPtg >= itemTopPtg,计算结果为元素应当补充的滚动距离相对自身高度的偏移量
74
+ offsetPtg: Number.isNaN(c) ? 0 : c
75
+ };
76
+ }
77
+ function Mt(l, o = !1) {
78
+ const i = Wt(l);
79
+ let e = 0;
80
+ if (o) {
81
+ const { marginTop: c, marginBottom: r } = window.getComputedStyle(l);
82
+ e = Number(c.replace(/\D/g, "")) + Number(r.replace(/\D/g, "")), e = isNaN(e) ? 0 : e;
83
+ }
84
+ return i ? i.offsetHeight + e : 0;
85
+ }
86
+ function ct(l, o) {
87
+ return l < 0 ? 0 : l > o ? o : l;
88
+ }
89
+ function V({
90
+ scrollTop: l,
91
+ scrollHeight: o,
92
+ clientHeight: i
93
+ }) {
94
+ const e = o - i;
95
+ return e <= 0 ? 0 : ct(l, e) / e;
96
+ }
97
+ function St(l, o, i) {
98
+ const { index: e, offsetPtg: c } = Et(l, o), r = Math.ceil(l * i), f = Math.ceil((1 - l) * i);
99
+ return {
100
+ itemIndex: e,
101
+ itemOffsetPtg: c,
102
+ startIndex: Math.max(0, e - r),
103
+ endIndex: Math.min(o - 1, e + f)
104
+ };
105
+ }
106
+ function J({
107
+ itemHeight: l,
108
+ itemOffsetPtg: o,
109
+ scrollPtg: i,
110
+ clientHeight: e
111
+ }) {
112
+ return Math.floor(e * i - l * o);
113
+ }
114
+ function Jt({ scrollTop: l, ...o }) {
115
+ return l + J(o);
116
+ }
117
+ function Qt({
118
+ locatedItemRelativeTop: l,
119
+ locatedItemIndex: o,
120
+ compareItemIndex: i,
121
+ startIndex: e,
122
+ endIndex: c,
123
+ getItemKey: r,
124
+ itemElementHeights: f,
125
+ itemHeight: H
126
+ }) {
127
+ let _ = l;
128
+ const R = r(i);
129
+ if (i <= o)
130
+ for (let T = o; T >= e && r(T) !== R; T -= 1) {
131
+ const v = r(T - 1);
132
+ _ -= f[v] || H;
133
+ }
134
+ else
135
+ for (let T = o; T <= c; T += 1) {
136
+ const I = r(T);
137
+ if (I === R)
138
+ break;
139
+ _ += f[I] || H;
140
+ }
141
+ return _;
142
+ }
143
+ function Zt(l) {
144
+ let o = -1, i = 0;
145
+ return l.forEach((e, c) => {
146
+ var r;
147
+ if (e = typeof e == "string" ? e : (r = e.props) == null ? void 0 : r.children, typeof e == "string") {
148
+ const f = Gt(e);
149
+ f > i && (i = f, o = c);
150
+ }
151
+ }), o;
152
+ }
153
+ const zt = 32, D = `__virtual_item_height_${Math.random().toFixed(5).slice(2)}`, te = (l) => {
154
+ const o = Ft(), { current: i } = l;
155
+ N(() => {
156
+ Object.keys(i).length && !i[D] && (i[D] = Object.entries(i).reduce(
157
+ (e, [, c], r, f) => {
158
+ const H = e + c;
159
+ return r === f.length - 1 ? Math.round(H / f.length) : H;
160
+ },
161
+ 0
162
+ ), o());
163
+ }, [Object.keys(i).length]);
164
+ }, ee = (l) => {
165
+ const o = w({}), i = w(l);
166
+ return N(() => {
167
+ i.current = l;
168
+ }, [l]), l !== i.current && (o.current = {}), (e, c, r) => (Object.prototype.hasOwnProperty.call(o.current, c) || (o.current[c] = l(e, c, r)), o.current[c]);
169
+ }, ne = it.forwardRef((l, o) => {
170
+ const {
171
+ style: i,
172
+ className: e,
173
+ children: c,
174
+ data: r = [],
175
+ itemKey: f,
176
+ threshold: H = 100,
177
+ wrapper: _ = "div",
178
+ height: R = "100%",
179
+ isStaticItemHeight: T = !0,
180
+ itemHeight: I,
181
+ measureLongestItem: v,
182
+ scrollOptions: F,
183
+ onScroll: C,
184
+ needFiller: _t = !0,
185
+ outerStyle: st,
186
+ innerStyle: ut,
187
+ wrapperChild: Q = it.Fragment,
188
+ ...bt
189
+ } = l, G = i && i.maxHeight || R, K = w({}), [Pt, Rt] = Ut(200), ft = ee(c);
190
+ te(K);
191
+ const k = r.length, A = I || K.current[D] || zt, W = xt(G) ? G : Pt, O = Math.ceil(W / A), Z = A * k, b = H !== null && k >= H && Z > W, a = w(null), L = w(null), j = w(!1), at = w(b), mt = Vt(() => {
192
+ if (a.current) {
193
+ const n = (t) => +window.getComputedStyle(a.current)[t].replace(/\D/g, "");
194
+ return {
195
+ top: n("paddingTop"),
196
+ bottom: n("paddingBottom")
197
+ };
198
+ }
199
+ return { top: 0, bottom: 0 };
200
+ }, [a.current]), [g, B] = Yt({
201
+ // measure status
202
+ status: "NONE",
203
+ // render range info
204
+ startIndex: 0,
205
+ endIndex: 0,
206
+ itemIndex: 0,
207
+ itemOffsetPtg: 0,
208
+ // scroll info
209
+ startItemTop: 0,
210
+ scrollTop: 0
211
+ }), $ = Bt(r) || [], vt = Kt(), Y = (n, t) => typeof f == "function" ? f(n, t) : typeof f == "string" ? n[f] : n.key || t, S = (n, t = r) => {
212
+ if (n === t.length)
213
+ return qt;
214
+ const s = t[n];
215
+ return s !== void 0 ? Y(s, n) : null;
216
+ }, E = (n) => K.current[n] || A, dt = (n) => {
217
+ const { itemIndex: t, relativeTop: s } = n, { scrollHeight: u, clientHeight: p } = a.current, m = g.scrollTop, x = u - p;
218
+ let d = Number.MAX_VALUE, h = null, M = null, y = null, q = null, U = null, tt = 0;
219
+ for (let et = 0; et < x; et++) {
220
+ const pt = $t(0, x, m, et), ht = V({
221
+ scrollTop: pt,
222
+ scrollHeight: u,
223
+ clientHeight: p
224
+ }), { itemIndex: nt, itemOffsetPtg: It, startIndex: rt, endIndex: ot } = St(
225
+ ht,
226
+ k,
227
+ O
228
+ );
229
+ if (rt <= t && t <= ot) {
230
+ const Nt = J({
231
+ itemHeight: E(S(nt)),
232
+ itemOffsetPtg: It,
233
+ clientHeight: p,
234
+ scrollPtg: ht
235
+ }), Ct = Qt({
236
+ locatedItemRelativeTop: Nt,
237
+ locatedItemIndex: nt,
238
+ compareItemIndex: t,
239
+ startIndex: rt,
240
+ endIndex: ot,
241
+ itemHeight: A,
242
+ getItemKey: S,
243
+ itemElementHeights: K.current
244
+ }), Tt = Math.abs(Ct - s);
245
+ Tt < d ? (d = Tt, h = pt, M = nt, y = It, q = rt, U = ot, tt = 0) : tt += 1;
246
+ }
247
+ if (tt > 10)
248
+ break;
249
+ }
250
+ h !== null && (j.current = !0, a.current.scrollTop = h, B({
251
+ ...g,
252
+ status: "MEASURE_START",
253
+ scrollTop: h,
254
+ itemIndex: M,
255
+ itemOffsetPtg: y,
256
+ startIndex: q,
257
+ endIndex: U
258
+ })), L.current = lt(() => {
259
+ j.current = !1;
260
+ });
261
+ }, wt = (n) => {
262
+ const {
263
+ scrollTop: t,
264
+ clientHeight: s,
265
+ scrollHeight: u
266
+ } = a.current, p = ct(
267
+ t,
268
+ u - s
269
+ ), m = V({
270
+ scrollTop: p,
271
+ clientHeight: s,
272
+ scrollHeight: u
273
+ }), { index: x, offsetPtg: d } = Et(m, k);
274
+ B({
275
+ ...g,
276
+ scrollTop: p,
277
+ itemIndex: x,
278
+ itemOffsetPtg: d
279
+ }), n && (C == null || C(n, { index: x }));
280
+ }, gt = (n, t = !1) => {
281
+ const s = Z, { scrollTop: u, clientHeight: p } = a.current, m = ct(
282
+ u,
283
+ s - p
284
+ );
285
+ if (!t && (m === g.scrollTop || j.current))
286
+ return;
287
+ const x = V({
288
+ scrollTop: m,
289
+ clientHeight: p,
290
+ scrollHeight: s
291
+ }), { itemIndex: d, itemOffsetPtg: h, startIndex: M, endIndex: y } = St(
292
+ x,
293
+ k,
294
+ O
295
+ );
296
+ B({
297
+ ...g,
298
+ scrollTop: m,
299
+ itemIndex: d,
300
+ itemOffsetPtg: h,
301
+ startIndex: M,
302
+ endIndex: y,
303
+ status: "MEASURE_START"
304
+ }), n && (C == null || C(n, { index: d }));
305
+ };
306
+ N(() => () => {
307
+ L.current && yt(L.current);
308
+ }, []), N(() => {
309
+ a.current && (vt && (a.current.scrollTop = 0), gt(null, !0));
310
+ }, [O]), N(() => {
311
+ if (!a.current) return;
312
+ let n = null;
313
+ const t = at.current !== b ? b ? "virtual" : "raw" : "";
314
+ if (at.current = b, W && $.length !== r.length) {
315
+ const s = Xt($, r, Y);
316
+ n = s ? s.index : null;
317
+ }
318
+ if (t || b && n) {
319
+ const { clientHeight: s } = a.current, u = J({
320
+ itemHeight: E(
321
+ S(g.itemIndex, $)
322
+ ),
323
+ itemOffsetPtg: g.itemOffsetPtg,
324
+ scrollPtg: V({
325
+ scrollTop: g.scrollTop,
326
+ scrollHeight: $.length * A,
327
+ clientHeight: s
328
+ }),
329
+ clientHeight: s
330
+ });
331
+ if (t === "raw") {
332
+ let p = u;
333
+ for (let m = 0; m < g.itemIndex; m++)
334
+ p -= E(S(m));
335
+ a.current.scrollTop = -p, j.current = !0, L.current = lt(() => {
336
+ j.current = !1;
337
+ });
338
+ } else
339
+ dt({
340
+ itemIndex: g.itemIndex,
341
+ relativeTop: u
342
+ });
343
+ }
344
+ }, [r, b]), jt(() => {
345
+ if (g.status === "MEASURE_START" && a.current) {
346
+ const { scrollTop: n, scrollHeight: t, clientHeight: s } = a.current, u = V({
347
+ scrollTop: n,
348
+ scrollHeight: t,
349
+ clientHeight: s
350
+ });
351
+ let p = Jt({
352
+ scrollPtg: u,
353
+ clientHeight: s,
354
+ scrollTop: n - (mt.top + mt.bottom) * u,
355
+ itemHeight: E(S(g.itemIndex)),
356
+ itemOffsetPtg: g.itemOffsetPtg
357
+ });
358
+ for (let m = g.itemIndex - 1; m >= g.startIndex; m--)
359
+ p -= E(S(m));
360
+ B({
361
+ ...g,
362
+ startItemTop: p,
363
+ status: "MEASURE_DONE"
364
+ });
365
+ }
366
+ }, [g]), Dt(
367
+ o,
368
+ () => ({
369
+ dom: a.current,
370
+ getRootDOMNode: () => a.current,
371
+ // Scroll to a certain height or an element
372
+ scrollTo: (n) => {
373
+ L.current && yt(L.current), L.current = lt(() => {
374
+ var x;
375
+ if (!a.current) return;
376
+ if (typeof n == "number") {
377
+ a.current.scrollTop = n;
378
+ return;
379
+ }
380
+ const t = "index" in n ? n.index : "key" in n ? r.findIndex(
381
+ (d, h) => Y(d, h) === n.key
382
+ ) : 0, s = r[t];
383
+ if (!s)
384
+ return;
385
+ let u = typeof n == "object" && ((x = n.options) != null && x.block) ? n.options.block : (F == null ? void 0 : F.block) || "nearest";
386
+ const { clientHeight: p, scrollTop: m } = a.current;
387
+ if (b && !T) {
388
+ if (u === "nearest") {
389
+ const { itemIndex: d, itemOffsetPtg: h } = g;
390
+ if (Math.abs(d - t) < O) {
391
+ let M = J({
392
+ itemHeight: E(S(d)),
393
+ itemOffsetPtg: h,
394
+ clientHeight: p,
395
+ scrollPtg: V(a.current)
396
+ });
397
+ if (t < d)
398
+ for (let y = t; y < d; y++)
399
+ M -= E(S(y));
400
+ else
401
+ for (let y = d; y < t; y++)
402
+ M += E(S(y));
403
+ if (M < 0 || M > p)
404
+ u = M < 0 ? "start" : "end";
405
+ else
406
+ return;
407
+ } else
408
+ u = t < d ? "start" : "end";
409
+ }
410
+ B({
411
+ ...g,
412
+ startIndex: Math.max(0, t - O),
413
+ endIndex: Math.min(k - 1, t + O)
414
+ }).then(() => {
415
+ const d = E(Y(s, t));
416
+ dt({
417
+ itemIndex: t,
418
+ relativeTop: u === "start" ? 0 : (p - d) / (u === "center" ? 2 : 1)
419
+ });
420
+ });
421
+ } else {
422
+ const d = E(
423
+ S(t)
424
+ );
425
+ let h = 0;
426
+ for (let U = 0; U < t; U++)
427
+ h += E(S(U));
428
+ const M = h + d, y = h + d / 2;
429
+ if (y > m && y < p + m)
430
+ return;
431
+ u === "nearest" && (h < m ? u = "start" : M > m + p && (u = "end"));
432
+ const q = p - d;
433
+ a.current.scrollTop = h - (u === "start" ? 0 : q / (u === "center" ? 2 : 1));
434
+ }
435
+ });
436
+ }
437
+ }),
438
+ [r, A, g]
439
+ );
440
+ const z = (n, t) => n.map((s, u) => {
441
+ const p = t + u, m = ft(s, p, {
442
+ style: {},
443
+ itemIndex: u
444
+ }), x = Y(s, p);
445
+ return it.cloneElement(m, {
446
+ key: x,
447
+ ref: (d) => {
448
+ const { current: h } = K;
449
+ d && g.status === "MEASURE_START" && (!T || h[x] === void 0) && (T ? (h[D] || (h[D] = Mt(d, !0)), h[x] = h[D]) : h[x] = Mt(d, !0)), Ot(m == null ? void 0 : m.ref) && (m == null || m.ref(d));
450
+ }
451
+ });
452
+ }), X = w(null);
453
+ N(() => {
454
+ X.current = null;
455
+ }, [r]);
456
+ const Lt = () => {
457
+ if (v) {
458
+ const n = X.current === null ? Zt(r) : X.current, t = r[n];
459
+ return X.current = n, t ? /* @__PURE__ */ P("div", { style: { height: 1, overflow: "hidden", opacity: 0 }, children: ft(t, n, { style: {} }) }) : null;
460
+ }
461
+ return null;
462
+ };
463
+ return N(() => {
464
+ function n() {
465
+ if (a.current && !xt(G)) {
466
+ const { clientHeight: s } = a.current;
467
+ Rt(s);
468
+ }
469
+ }
470
+ let t;
471
+ return a.current && (t = new ResizeObserver(n), t.observe(a.current)), () => {
472
+ var s, u;
473
+ a.current && ((s = t == null ? void 0 : t.unobserve) == null || s.call(t, a.current)), (u = t == null ? void 0 : t.disconnect) == null || u.call(t), t = null;
474
+ };
475
+ }, [a.current]), /* @__PURE__ */ P(
476
+ _,
477
+ {
478
+ ref: a,
479
+ style: {
480
+ overflowY: "auto",
481
+ overflowAnchor: "none",
482
+ ...i,
483
+ maxHeight: G
484
+ },
485
+ className: e,
486
+ onScroll: b ? gt : wt,
487
+ ...bt,
488
+ children: b ? /* @__PURE__ */ kt(At, { children: [
489
+ /* @__PURE__ */ P(
490
+ Ht,
491
+ {
492
+ height: Z,
493
+ outerStyle: st,
494
+ innerStyle: ut,
495
+ offset: g.status === "MEASURE_DONE" ? g.startItemTop : 0,
496
+ children: /* @__PURE__ */ P(Q, { children: z(
497
+ r.slice(g.startIndex, g.endIndex + 1),
498
+ g.startIndex
499
+ ) })
500
+ }
501
+ ),
502
+ Lt()
503
+ ] }) : _t ? /* @__PURE__ */ P(
504
+ Ht,
505
+ {
506
+ height: W,
507
+ outerStyle: st,
508
+ innerStyle: ut,
509
+ children: /* @__PURE__ */ P(Q, { children: z(r, 0) })
510
+ }
511
+ ) : /* @__PURE__ */ P(Q, { children: z(r, 0) })
512
+ }
513
+ );
514
+ });
515
+ ne.displayName = "VirtualList";
516
+ export {
517
+ ne as V
518
+ };
@@ -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 u = i.forwardRef(function(r, t) {
5
5
  const e = n({ ...r, name: "ui-up" });
6
6
  return /* @__PURE__ */ o(
@@ -1090,9 +1090,13 @@ const qt = An, Ot = Zn, Ft = Dn, At = Sn, Zt = {
1090
1090
  divide: At
1091
1091
  };
1092
1092
  export {
1093
+ Ft as c,
1093
1094
  At as d,
1094
1095
  Zn as i,
1095
1096
  Zt as l,
1097
+ Ot as m,
1096
1098
  Dn as o,
1099
+ Sn as r,
1100
+ qt as s,
1097
1101
  An as u
1098
1102
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import m from "react";
3
- import { u as i } from "./B45v5S9k.js";
3
+ import { u as i } from "./BHn4xgbv.js";
4
4
  const c = m.forwardRef(function(t, o) {
5
5
  const r = i({ ...t, name: "ui-delete" });
6
6
  return /* @__PURE__ */ e(
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import c from "react";
3
- import { u as i } from "./B45v5S9k.js";
3
+ import { u as i } from "./BHn4xgbv.js";
4
4
  const p = c.forwardRef(function(r, e) {
5
5
  const t = i({ ...r, name: "ui-clock-circle" });
6
6
  return /* @__PURE__ */ o(
@@ -1,6 +1,6 @@
1
1
  import { jsxs as e, jsx as t } 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 c = i.forwardRef(function(h, o) {
5
5
  const r = n({ ...h, name: "ui-drag-dot-vertical" });
6
6
  return /* @__PURE__ */ e(