@unicom-cloud/ui 0.8.75 → 0.8.77

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 (286) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +3 -5
  4. package/BackTop.js +1 -1
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +3 -3
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +6 -2
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +3 -4
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +2 -3
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +1 -1
  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 +5 -6
  31. package/Mentions.js +3 -4
  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 +1 -1
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Pagination.js +2 -2
  40. package/Popconfirm.js +1 -1
  41. package/Popover.js +1 -1
  42. package/Progress.js +1 -1
  43. package/Radio.js +5 -4
  44. package/Rate.js +1 -1
  45. package/ResizeBox.js +1 -1
  46. package/Result.js +1 -1
  47. package/Select.js +5 -6
  48. package/Skeleton.js +1 -1
  49. package/Slider.js +1 -1
  50. package/Space.js +1 -1
  51. package/SpeechSynthesis.js +4 -3
  52. package/Spin.js +1 -1
  53. package/Statistic.js +1 -1
  54. package/Steps.js +1 -1
  55. package/Switch.js +1 -1
  56. package/Table.js +15 -16
  57. package/Tabs.js +1 -1
  58. package/Tag.js +1 -1
  59. package/Tooltip.js +2 -2
  60. package/Transfer.js +3 -4
  61. package/Tree.js +2 -3
  62. package/TreeSelect.js +3 -3
  63. package/Trigger.js +1 -1
  64. package/Typography.js +3 -3
  65. package/affix/index.js +86 -82
  66. package/alert/index.js +1 -1
  67. package/anchor/Anchor.js +1 -1
  68. package/anchor/Link.js +1 -1
  69. package/auto-complete/index.js +13 -147
  70. package/avatar/Avatar.js +1 -1
  71. package/avatar/Group.js +1 -1
  72. package/back-top/index.js +1 -1
  73. package/badge/index.js +1 -1
  74. package/breadcrumb/index.js +2 -2
  75. package/button/Group.js +1 -1
  76. package/button/index.js +1 -1
  77. package/calendar/index.js +12 -318
  78. package/card/Grid.js +1 -1
  79. package/card/Meta.js +1 -1
  80. package/card/index.js +1 -1
  81. package/carousel/Arrow.js +1 -1
  82. package/carousel/Indicator.js +1 -1
  83. package/carousel/index.js +1 -1
  84. package/cascader/Cascader.js +4 -4
  85. package/cascader/index.js +1 -1
  86. package/cascader/util.js +8 -8
  87. package/checkbox/Checkbox.js +7 -4
  88. package/checkbox/Group.js +5 -5
  89. package/checkbox/GroupBlock.js +8 -0
  90. package/checkbox/index.js +7 -2
  91. package/chunk/{BbqvFW5R.js → 9TSjT7x_.js} +112 -112
  92. package/chunk/ATwvJ8j2.js +6 -0
  93. package/chunk/{Dv6USvVF.js → BC5fEyWK.js} +2 -1
  94. package/chunk/{WVoGhvMI.js → BPQXH_5i.js} +32 -31
  95. package/chunk/{BPD5iNdA.js → CB4jGw4K.js} +22 -18
  96. package/chunk/{B8hkFIar.js → CBgu99gQ.js} +1 -1
  97. package/chunk/CBzE-PUr.js +23 -0
  98. package/chunk/CNcLypMY.js +723 -0
  99. package/chunk/{CPlPBkN7.js → C_4I3haT.js} +1 -1
  100. package/chunk/{0mWCmQHr.js → CjqvxJml.js} +2 -2
  101. package/chunk/Cwm8LL5p.js +7818 -0
  102. package/chunk/D0ZWT7db.js +5 -0
  103. package/chunk/{CWlklVfi.js → tpmioyz1.js} +1 -1
  104. package/collapse/Collapse.js +2 -2
  105. package/collapse/Item.js +2 -2
  106. package/collapse/index.js +1 -1
  107. package/color-picker/ControlBar.js +1 -1
  108. package/color-picker/InputAlpha.js +1 -1
  109. package/color-picker/InputHex.js +2 -2
  110. package/color-picker/InputRgb.js +2 -2
  111. package/color-picker/Palette.js +2 -2
  112. package/color-picker/Panel.js +15 -266
  113. package/color-picker/colors.js +4 -4
  114. package/color-picker/index.js +13 -268
  115. package/color-picker/utils.js +1 -1
  116. package/comment/index.js +1 -1
  117. package/config-provider/ConfigProvider.js +4 -6
  118. package/config-provider/context.js +3 -2
  119. package/config-provider/index.js +4 -5
  120. package/copy/index.js +1 -1
  121. package/date-picker/Picker.js +1 -1
  122. package/date-picker/PickerRange.js +2 -2
  123. package/date-picker/index.js +1 -1
  124. package/descriptions/index.js +1 -1
  125. package/divider/index.js +1 -1
  126. package/draggable/index.js +1 -1
  127. package/drawer/Drawer.js +30 -21
  128. package/dropdown/Button.js +1 -1
  129. package/dropdown/index.js +1 -1
  130. package/empty/index.js +1 -1
  131. package/form/Form.js +10 -10
  132. package/form/FormItem.js +1 -1
  133. package/form/context.js +1 -1
  134. package/grid/Col.js +1 -1
  135. package/grid/Row.js +1 -1
  136. package/grid/grid-item.js +1 -1
  137. package/grid/grid.js +1 -1
  138. package/hooks/index.js +1 -1
  139. package/hooks/useWindowSize.js +1 -1
  140. package/icon/index.js +1 -1
  141. package/icon-hover/index.js +1 -1
  142. package/image/Image.js +2 -2
  143. package/image/ImagePreview.js +2 -2
  144. package/image/ImagePreviewArrow.js +1 -1
  145. package/image/ImagePreviewGroup.js +1 -1
  146. package/image/index.js +1 -1
  147. package/index.js +453 -463
  148. package/input/Group.js +1 -1
  149. package/input/Input.js +1 -1
  150. package/input/InputElement.js +1 -1
  151. package/input/Password.js +1 -1
  152. package/input/Search.js +1 -1
  153. package/input/Textarea.js +1 -1
  154. package/input-number/index.js +1 -1
  155. package/input-tag/InputTag.js +1 -1
  156. package/layout/Content.js +1 -1
  157. package/layout/Footer.js +1 -1
  158. package/layout/Header.js +1 -1
  159. package/layout/Sider.js +1 -1
  160. package/layout/index.js +1 -1
  161. package/link/index.js +1 -1
  162. package/list/Item.js +1 -1
  163. package/list/Meta.js +1 -1
  164. package/list/index.js +17 -267
  165. package/mentions/index.js +11 -144
  166. package/menu/Menu.js +2 -2
  167. package/menu/OverflowWrap.js +1 -1
  168. package/menu/index.js +2 -2
  169. package/message/index.js +1 -1
  170. package/message/useMessage.js +1 -1
  171. package/modal/Confirm.js +2 -2
  172. package/modal/Modal.js +2 -2
  173. package/modal/index.js +1 -1
  174. package/notice/index.js +1 -1
  175. package/notification/index.js +1 -1
  176. package/notification/useNotification.js +1 -1
  177. package/overflow-ellipsis/OverflowItem.js +1 -1
  178. package/overflow-ellipsis/index.js +1 -1
  179. package/package.json +1 -1
  180. package/page-header/index.js +1 -1
  181. package/pagination/PageItem.js +1 -1
  182. package/pagination/PageJumper.js +1 -1
  183. package/pagination/PageOption.js +5 -45
  184. package/pagination/Pagination.js +11 -243
  185. package/pagination/index.js +2 -2
  186. package/picker/Input.js +1 -1
  187. package/picker/InputRange.js +1 -1
  188. package/popconfirm/index.js +1 -1
  189. package/popover/index.js +1 -1
  190. package/progress/index.js +1 -1
  191. package/radio/Group.js +5 -5
  192. package/radio/GroupBlock.js +9 -0
  193. package/radio/Radio.js +6 -5
  194. package/radio/index.js +4 -3
  195. package/rate/index.js +1 -1
  196. package/resize-box/ResizeTrigger.js +1 -1
  197. package/resize-box/Split.js +1 -1
  198. package/resize-box/SplitGroup.js +1 -1
  199. package/resize-box/index.js +1 -1
  200. package/result/index.js +1 -1
  201. package/select/Option.js +6 -93
  202. package/select/Select.js +23 -546
  203. package/select/index.js +3 -3
  204. package/select/util.js +18 -139
  205. package/select-view/Core.js +1 -1
  206. package/skeleton/index.js +1 -1
  207. package/slider/Button.js +1 -1
  208. package/slider/index.js +1 -1
  209. package/space/index.js +1 -1
  210. package/speech-synthesis/index.js +4 -3
  211. package/spin/DotLoading.js +1 -1
  212. package/spin/index.js +1 -1
  213. package/statistic/Countdown.js +1 -1
  214. package/statistic/index.js +1 -1
  215. package/steps/index.js +1 -1
  216. package/style/variables.less +0 -484
  217. package/style.css +1 -1
  218. package/switch/index.js +1 -1
  219. package/table/Table.js +2 -3
  220. package/table/index.js +15 -109
  221. package/tabs/Tab.js +2 -2
  222. package/tabs/TabContent.js +2 -2
  223. package/tabs/TabPane.js +1 -1
  224. package/tabs/index.js +2 -2
  225. package/tag/index.js +1 -1
  226. package/time-picker/Picker.js +1 -1
  227. package/time-picker/TimePicker.js +1 -1
  228. package/timeline/Item.js +1 -1
  229. package/timeline/Timeline.js +1 -1
  230. package/tooltip/index.js +2 -2
  231. package/transfer/Item.js +9 -104
  232. package/transfer/List.js +13 -184
  233. package/transfer/index.js +13 -180
  234. package/tree/Animation.js +2 -2
  235. package/tree/Node.js +3 -4
  236. package/tree/NodeList.js +6 -80
  237. package/tree/Tree.js +17 -578
  238. package/tree/index.js +2 -3
  239. package/tree-select/List.js +6 -122
  240. package/tree-select/Select.js +22 -392
  241. package/tree-select/index.js +3 -3
  242. package/trigger/index.js +1 -1
  243. package/types/checkbox/Checkbox.d.ts +5 -2
  244. package/types/checkbox/GroupBlock.d.ts +7 -0
  245. package/types/checkbox/index.d.ts +2 -1
  246. package/types/config-provider/ConfigProvider.d.ts +0 -27
  247. package/types/config-provider/interface.d.ts +3 -1
  248. package/types/index.d.ts +2 -2
  249. package/types/menu/context.d.ts +1 -1
  250. package/types/radio/GroupBlock.d.ts +7 -0
  251. package/types/radio/Radio.d.ts +5 -3
  252. package/types/utils/constant.d.ts +2 -1
  253. package/types/utils/index.d.ts +1 -0
  254. package/types/utils/setDarkTheme.d.ts +2 -3
  255. package/types/utils/setPrimaryColor.d.ts +2 -0
  256. package/typography/Base.js +1 -1
  257. package/typography/Ellipsis.js +9 -22
  258. package/typography/Paragraph.js +1 -1
  259. package/typography/Typography.js +1 -1
  260. package/typography/index.js +10 -276
  261. package/upload/TriggerNode.js +1 -1
  262. package/upload/Upload.js +1 -1
  263. package/upload/Uploader.js +43 -44
  264. package/upload/request.js +1 -1
  265. package/upload/request_.js +1 -1
  266. package/utils/caseName.js +1 -1
  267. package/utils/color.js +1 -1
  268. package/utils/constant.js +7 -5
  269. package/utils/contextHolder.js +1 -1
  270. package/utils/dom.js +1 -1
  271. package/utils/index.js +199 -195
  272. package/utils/setDarkTheme.js +34 -5
  273. package/utils/setPrimaryColor.js +26 -0
  274. package/utils/tinycolor.js +1 -1
  275. package/verification-code/VerificationCode.js +1 -1
  276. package/version/index.js +1 -1
  277. package/watermark/Watermark.js +1 -1
  278. package/chunk/BViFMHr-.js +0 -1820
  279. package/chunk/BsWphzcT.js +0 -20
  280. package/chunk/BxZ39GzB.js +0 -209
  281. package/chunk/C9XYyypq.js +0 -713
  282. package/chunk/CIkPwQlq.js +0 -6
  283. package/chunk/DFcz9ZPP.js +0 -1020
  284. package/chunk/DeCsZrXb.js +0 -310
  285. package/chunk/DskaI8QL.js +0 -25
  286. package/chunk/EL5Jmjgr.js +0 -170
@@ -3,7 +3,7 @@ import ln from "@unicom-cloud/icons/IconUiClose";
3
3
  import Ie from "lodash/isFunction";
4
4
  import sn, { forwardRef as Oe, useState as $, useImperativeHandle as an, useRef as x, useContext as cn, useCallback as U, useEffect as oe } from "react";
5
5
  import De from "../button/index.js";
6
- import { b as Le, d as un, a as dn, I as mn } from "./C9XYyypq.js";
6
+ import { b as Le, d as un, a as dn, I as mn } from "./CNcLypMY.js";
7
7
  import { u as fn } from "./oopARUrq.js";
8
8
  import { u as pn } from "./BFTV6myl.js";
9
9
  import { u as Cn } from "./DeV0v__J.js";
@@ -14,9 +14,9 @@ import { p as Be } from "./CUFsOxJ2.js";
14
14
  import { contains as gn, isServerRendering as xn } from "../utils/dom.js";
15
15
  import { o as kn } from "./BrOW642m.js";
16
16
  import { o as vn } from "./BKKEev13.js";
17
- import { f as wn } from "./Cc_-i0o_.js";
18
- import En from "@unicom-cloud/icons/IconUiCheckCircleFill";
19
- import Mn from "@unicom-cloud/icons/IconUiCloseCircleFill";
17
+ import { f as Mn } from "./Cc_-i0o_.js";
18
+ import wn from "@unicom-cloud/icons/IconUiCheckCircleFill";
19
+ import En from "@unicom-cloud/icons/IconUiCloseCircleFill";
20
20
  import Re from "@unicom-cloud/icons/IconUiExclamationCircleFill";
21
21
  import Tn from "@unicom-cloud/icons/IconUiInfoCircleFill";
22
22
  import { createRoot as yn } from "react-dom/client";
@@ -35,13 +35,13 @@ const V = (n) => {
35
35
  i = /* @__PURE__ */ s(Tn, {});
36
36
  break;
37
37
  case "success":
38
- i = /* @__PURE__ */ s(En, {});
38
+ i = /* @__PURE__ */ s(wn, {});
39
39
  break;
40
40
  case "warning":
41
41
  i = /* @__PURE__ */ s(Re, {});
42
42
  break;
43
43
  case "error":
44
- i = /* @__PURE__ */ s(Mn, {});
44
+ i = /* @__PURE__ */ s(En, {});
45
45
  break;
46
46
  }
47
47
  }
@@ -57,7 +57,7 @@ function le(n, i) {
57
57
  t.className = "pqb-modal-root", document.body.appendChild(t);
58
58
  const m = Nn();
59
59
  function k(a) {
60
- const h = /* @__PURE__ */ s(Le, { ...m, children: /* @__PURE__ */ s(
60
+ const h = /* @__PURE__ */ s(Le, { ...m, childrenName: "ModalConfirm", children: /* @__PURE__ */ s(
61
61
  Dn,
62
62
  {
63
63
  getPopupContainer: () => t,
@@ -247,12 +247,12 @@ const Ln = {
247
247
  alignCenter: !0
248
248
  };
249
249
  function Xn(n, i) {
250
- var Ee;
250
+ var we;
251
251
  i || (i = x());
252
252
  const u = cn(dn), t = pn(
253
253
  n,
254
254
  Ln,
255
- (Ee = u.componentConfig) == null ? void 0 : Ee.Modal
255
+ (we = u.componentConfig) == null ? void 0 : we.Modal
256
256
  ), {
257
257
  className: m,
258
258
  style: k,
@@ -285,7 +285,7 @@ function Xn(n, i) {
285
285
  closeIcon: ae,
286
286
  fullscreenable: Yn,
287
287
  ...ce
288
- } = t, B = x(null), ue = x(null), w = x(null), [de, me] = $(), [fe, ze] = $(), Y = x(null), R = x(!1), [qe, pe] = $(""), [Ce, he] = $("");
288
+ } = t, B = x(null), ue = x(null), M = x(null), [de, me] = $(), [fe, ze] = $(), Y = x(null), R = x(!1), [qe, pe] = $(""), [Ce, he] = $("");
289
289
  fn();
290
290
  const A = x(!0);
291
291
  l && A.current && (A.current = !1);
@@ -294,7 +294,7 @@ function Xn(n, i) {
294
294
  const [We, K] = Cn(!1, {
295
295
  defaultValue: !1,
296
296
  value: Xe
297
- }), d = u.getPrefixCls("modal", t.prefixCls), { locale: G, rtl: be } = u, Ze = !r || ce.noticeType === "show", je = "closable" in t ? t.closable : Ze, Ae = U(() => wn(f()), [f]);
297
+ }), d = u.getPrefixCls("modal", t.prefixCls), { locale: G, rtl: be } = u, Ze = !r || ce.noticeType === "show", je = "closable" in t ? t.closable : Ze, Ae = U(() => Mn(f()), [f]);
298
298
  hn(Ae, { hidden: l && X });
299
299
  function J(e) {
300
300
  e.stopPropagation(), Q();
@@ -337,7 +337,7 @@ function Xn(n, i) {
337
337
  isNaN(o) || ze(o + 1);
338
338
  }
339
339
  }, _e = () => {
340
- var g, E, M, I, S, y, N, Me, Te, ye, Ne, Pe;
340
+ var g, w, E, I, S, y, N, Ee, Te, ye, Ne, Pe;
341
341
  if (L === null)
342
342
  return;
343
343
  const e = ((g = t.cancelButton) == null ? void 0 : g.visible) !== !1 && /* @__PURE__ */ s(
@@ -345,8 +345,8 @@ function Xn(n, i) {
345
345
  {
346
346
  onClick: J,
347
347
  ...h,
348
- ...(E = t.cancelButton) == null ? void 0 : E.props,
349
- children: ((I = (M = t.cancelButton) == null ? void 0 : M.props) == null ? void 0 : I.children) || ((S = t.cancelButton) == null ? void 0 : S.label) || ((y = t.cancelButton) == null ? void 0 : y.text) || P || G.Modal.cancelText
348
+ ...(w = t.cancelButton) == null ? void 0 : w.props,
349
+ children: ((I = (E = t.cancelButton) == null ? void 0 : E.props) == null ? void 0 : I.children) || ((S = t.cancelButton) == null ? void 0 : S.label) || ((y = t.cancelButton) == null ? void 0 : y.text) || P || G.Modal.cancelText
350
350
  }
351
351
  ), o = ((N = t.okButton) == null ? void 0 : N.visible) !== !1 && /* @__PURE__ */ s(
352
352
  De,
@@ -355,7 +355,7 @@ function Xn(n, i) {
355
355
  onClick: Je,
356
356
  type: "primary",
357
357
  ...a,
358
- ...(Me = t.okButton) == null ? void 0 : Me.props,
358
+ ...(Ee = t.okButton) == null ? void 0 : Ee.props,
359
359
  children: ((ye = (Te = t.okButton) == null ? void 0 : Te.props) == null ? void 0 : ye.children) || ((Ne = t.okButton) == null ? void 0 : Ne.label) || ((Pe = t.okButton) == null ? void 0 : Pe.text) || v || G.Modal.okText
360
360
  }
361
361
  ), p = Ie(L) ? L(e, o) : L || /* @__PURE__ */ O(rn, { children: [
@@ -366,18 +366,18 @@ function Xn(n, i) {
366
366
  }, ee = x(
367
367
  ke()
368
368
  ), en = U((e) => {
369
- var p, g, E, M, I;
370
- if (!w.current) return;
369
+ var p, g, w, E, I;
370
+ if (!M.current) return;
371
371
  e.preventDefault();
372
372
  const o = ee.current;
373
- o.screenX = e.screenX, o.screenY = e.screenY, o.prewTranslateX = o.translateX, o.prewTranslateY = o.translateY, o.boundingClientRect = ((g = (p = w.current) == null ? void 0 : p.getBoundingClientRect) == null ? void 0 : g.call(p)) ?? {}, o.offsetParentBoundingClientRect = ((I = (M = (E = w.current) == null ? void 0 : E.offsetParent) == null ? void 0 : M.getBoundingClientRect) == null ? void 0 : I.call(M)) ?? {}, H(), nn();
373
+ o.screenX = e.screenX, o.screenY = e.screenY, o.prewTranslateX = o.translateX, o.prewTranslateY = o.translateY, o.boundingClientRect = ((g = (p = M.current) == null ? void 0 : p.getBoundingClientRect) == null ? void 0 : g.call(p)) ?? {}, o.offsetParentBoundingClientRect = ((I = (E = (w = M.current) == null ? void 0 : w.offsetParent) == null ? void 0 : E.getBoundingClientRect) == null ? void 0 : I.call(E)) ?? {}, H(), nn();
374
374
  }, []), ge = U((e) => {
375
375
  e.preventDefault();
376
- const o = ee.current, { left: p, right: g, top: E, bottom: M } = o.boundingClientRect ?? {}, { width: I, height: S } = o.offsetParentBoundingClientRect ?? {};
376
+ const o = ee.current, { left: p, right: g, top: w, bottom: E } = o.boundingClientRect ?? {}, { width: I, height: S } = o.offsetParentBoundingClientRect ?? {};
377
377
  let y = Math.max(e.screenX - o.screenX, -p);
378
378
  y = Math.min(y, I - g);
379
- let N = Math.max(e.screenY - o.screenY, -E);
380
- N = Math.min(N, S - M), y += o.prewTranslateX, N += o.prewTranslateY, o.translateX = y, o.translateY = N, pe(`translate(${y}px, ${N}px)`);
379
+ let N = Math.max(e.screenY - o.screenY, -w);
380
+ N = Math.min(N, S - E), y += o.prewTranslateX, N += o.prewTranslateY, o.translateX = y, o.translateY = N, pe(`translate(${y}px, ${N}px)`);
381
381
  }, []), xe = U((e) => {
382
382
  e.preventDefault(), H();
383
383
  }, []);
@@ -416,12 +416,13 @@ function Xn(n, i) {
416
416
  }
417
417
  oe(() => () => {
418
418
  ne(), H();
419
- }, []), oe(() => (w.current || (ne(), H()), () => {
420
- }), [w.current]);
419
+ }, []), oe(() => (M.current || (ne(), H()), () => {
420
+ }), [M.current]);
421
421
  const tn = /* @__PURE__ */ O(
422
422
  Le,
423
423
  {
424
424
  ...u,
425
+ childrenName: "Modal",
425
426
  prefixCls: t.prefixCls || u.prefixCls,
426
427
  locale: G,
427
428
  zIndex: fe || 1050,
@@ -488,7 +489,7 @@ function Xn(n, i) {
488
489
  transform: qe,
489
490
  transformOrigin: Ce
490
491
  },
491
- ref: w,
492
+ ref: M,
492
493
  children: tn
493
494
  }
494
495
  ), te = (e) => {
@@ -496,16 +497,16 @@ function Xn(n, i) {
496
497
  return;
497
498
  let o = "";
498
499
  if (Y.current) {
499
- const p = e.getBoundingClientRect(), { left: g, top: E } = Y.current;
500
- o = `${g - p.left}px ${E - p.top}px`;
500
+ const p = e.getBoundingClientRect(), { left: g, top: w } = Y.current;
501
+ o = `${g - p.left}px ${w - p.top}px`;
501
502
  }
502
503
  he(o);
503
- }, we = A.current ? !q : !!w.current;
504
- return l || we ? /* @__PURE__ */ s(
504
+ }, Me = A.current ? !q : !!M.current;
505
+ return l || Me ? /* @__PURE__ */ s(
505
506
  bn,
506
507
  {
507
508
  visible: l,
508
- forceRender: we,
509
+ forceRender: Me,
509
510
  getContainer: f,
510
511
  children: /* @__PURE__ */ O(
511
512
  "div",
@@ -587,7 +588,7 @@ function Xn(n, i) {
587
588
  unmountOnExit: W,
588
589
  mountOnEnter: q,
589
590
  onEnter: (e) => {
590
- e && (me(!0), Y.current = re, te(e), w.current = e);
591
+ e && (me(!0), Y.current = re, te(e), M.current = e);
591
592
  },
592
593
  onEntered: (e) => {
593
594
  e && (te(e), Y.current = null, Z == null || Z());
@@ -596,7 +597,7 @@ function Xn(n, i) {
596
597
  _.current = !0;
597
598
  },
598
599
  onExited: (e) => {
599
- e && (me(!1), te(e), z == null || z(), _.current = !1, W && (w.current = null));
600
+ e && (me(!1), te(e), z == null || z(), _.current = !1, W && (M.current = null));
600
601
  },
601
602
  children: sn.cloneElement(
602
603
  Ie(ie) ? ie(ve) : ve,
@@ -1,12 +1,11 @@
1
1
  import d from "lodash/debounce";
2
- import { useState as c, useDeferredValue as h, useCallback as i, useEffect as w } from "react";
3
- import { u as f } from "./BL9DMeor.js";
4
- const p = (r = !1) => {
5
- const [o, s] = c({
6
- width: (window == null ? void 0 : window.innerWidth) ?? 0,
7
- height: (window == null ? void 0 : window.innerHeight) ?? 0
8
- }), u = h(
9
- o
2
+ import { useState as l, useDeferredValue as h, useCallback as o, useEffect as m } from "react";
3
+ import { u as z } from "./BL9DMeor.js";
4
+ const R = (s = !1) => {
5
+ const [i, u] = l({
6
+ ...n(null)
7
+ }), c = h(
8
+ i
10
9
  // 延迟一个值与防抖和节流之间有什么不同?
11
10
  // 防抖 是指在用户停止输入一段时间(例如一秒钟)之后再更新列表。
12
11
  // 节流 是指每隔一段时间(例如最多每秒一次)更新列表。
@@ -14,16 +13,21 @@ const p = (r = !1) => {
14
13
  // 与防抖或节流不同,useDeferredValue 不需要选择任何固定延迟时间。如果用户的设备很快(比如性能强劲的笔记本电脑),延迟的重渲染几乎会立即发生并且不会被察觉。如果用户的设备较慢,那么列表会相应地“滞后”于输入,滞后的程度与设备的速度有关。
15
14
  // 此外,与防抖或节流不同,useDeferredValue 执行的延迟重新渲染默认是可中断的。这意味着,如果 React 正在重新渲染一个大型列表,但用户进行了另一次键盘输入,React 会放弃该重新渲染,先处理键盘输入,然后再次开始在后台渲染。相比之下,防抖和节流仍会产生不顺畅的体验,因为它们是阻塞的:它们仅仅是将渲染阻塞键盘输入的时刻推迟了。
16
15
  // 如果你要优化的工作不是在渲染期间发生的,那么防抖和节流仍然非常有用。例如,它们可以让你减少网络请求的次数。你也可以同时使用这些技术。
17
- ), t = i((e) => {
18
- const n = (e == null ? void 0 : e.currentTarget) ?? (e == null ? void 0 : e.target) ?? window;
19
- s({
20
- width: n.innerWidth,
21
- height: n.innerHeight
22
- });
23
- }, []), a = i(d(t, 123), []);
24
- return f(r ? a : t, []), w(() => () => {
25
- }, []), u;
16
+ );
17
+ function n(e) {
18
+ const t = (e == null ? void 0 : e.currentTarget) ?? (e == null ? void 0 : e.target) ?? window;
19
+ return {
20
+ width: (t == null ? void 0 : t.innerWidth) ?? 0,
21
+ height: (t == null ? void 0 : t.innerHeight) ?? 0
22
+ };
23
+ }
24
+ function r(e) {
25
+ u(n(e));
26
+ }
27
+ const a = o(r, []), f = o(d(r, 123), []);
28
+ return z(s ? f : a, []), m(() => () => {
29
+ }, []), c;
26
30
  };
27
31
  export {
28
- p as u
32
+ R as u
29
33
  };
@@ -3,7 +3,7 @@ import Ke from "@unicom-cloud/icons/IconUiMenuFold";
3
3
  import _e from "@unicom-cloud/icons/IconUiMenuUnfold";
4
4
  import Re from "lodash/isPlainObject";
5
5
  import F, { useContext as T, useState as fe, forwardRef as he, useEffect as te, useRef as ne, useMemo as Te } from "react";
6
- import { a as ge } from "./C9XYyypq.js";
6
+ import { a as ge } from "./CNcLypMY.js";
7
7
  import { u as Ae } from "./CQ_WOOmf.js";
8
8
  import { u as oe } from "./B4YRLi8r.js";
9
9
  import { u as Ue } from "./XTEsYGuF.js";
@@ -0,0 +1,23 @@
1
+ import C from "lodash/camelCase.js";
2
+ import N from "lodash/capitalize.js";
3
+ import n from "lodash/kebabCase.js";
4
+ import c from "lodash/lowerFirst.js";
5
+ import l from "lodash/snakeCase.js";
6
+ import u from "lodash/startCase.js";
7
+ import a from "lodash/upperFirst.js";
8
+ function d(m) {
9
+ const o = n(m), e = l(m), r = C(m), t = N(m), i = u(m), p = c(m), s = a(m), f = a(r);
10
+ return {
11
+ kebabCaseName: o,
12
+ snakeCaseName: e,
13
+ camelCaseName: r,
14
+ capitalizeName: t,
15
+ startCaseName: i,
16
+ lowerFirstCaseName: p,
17
+ upperFirstCaseName: s,
18
+ ComponentCaseName: f
19
+ };
20
+ }
21
+ export {
22
+ d as g
23
+ };