@unicom-cloud/ui 0.8.81 → 0.8.83

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 (280) 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/Input.js +11 -10
  28. package/InputNumber.js +1 -1
  29. package/Layout.js +1 -1
  30. package/Link.js +1 -1
  31. package/List.js +2 -2
  32. package/Mentions.js +2 -2
  33. package/Menu.js +1 -1
  34. package/Message.js +1 -1
  35. package/Modal.js +1 -1
  36. package/Notice.js +1 -1
  37. package/Notification.js +5 -5
  38. package/OverflowEllipsis.js +1 -1
  39. package/PageHeader.js +1 -1
  40. package/Pagination.js +1 -1
  41. package/Popconfirm.js +1 -1
  42. package/Popover.js +1 -1
  43. package/Progress.js +1 -1
  44. package/Radio.js +1 -1
  45. package/Rate.js +1 -1
  46. package/ResizeBox.js +1 -1
  47. package/Result.js +1 -1
  48. package/Select.js +1 -1
  49. package/Skeleton.js +1 -1
  50. package/Slider.js +1 -1
  51. package/Space.js +1 -1
  52. package/SpeechSynthesis.js +1 -1
  53. package/Spin.js +1 -1
  54. package/Statistic.js +2 -2
  55. package/Steps.js +1 -1
  56. package/Switch.js +1 -1
  57. package/Table.js +1 -1
  58. package/Tabs.js +1 -1
  59. package/Tag.js +1 -1
  60. package/Tooltip.js +1 -1
  61. package/Transfer.js +2 -2
  62. package/Tree.js +1 -1
  63. package/TreeSelect.js +1 -1
  64. package/Trigger.js +1 -1
  65. package/Typography.js +1 -1
  66. package/affix/index.js +60 -57
  67. package/alert/index.js +53 -53
  68. package/anchor/Anchor.js +72 -72
  69. package/anchor/Link.js +27 -27
  70. package/anchor/util.js +1 -1
  71. package/auto-complete/index.js +2 -2
  72. package/avatar/Avatar.js +31 -31
  73. package/avatar/Group.js +25 -25
  74. package/back-top/index.js +30 -30
  75. package/badge/index.js +37 -37
  76. package/breadcrumb/index.js +26 -26
  77. package/button/Group.js +7 -7
  78. package/button/index.js +29 -29
  79. package/calendar/index.js +2 -2
  80. package/card/Grid.js +12 -12
  81. package/card/Meta.js +17 -17
  82. package/card/index.js +44 -44
  83. package/carousel/Arrow.js +19 -19
  84. package/carousel/Indicator.js +25 -25
  85. package/carousel/index.js +77 -77
  86. package/cascader/Cascader.js +2 -2
  87. package/cascader/index.js +1 -1
  88. package/cascader/util.js +1 -1
  89. package/checkbox/Checkbox.js +2 -2
  90. package/checkbox/Group.js +2 -2
  91. package/checkbox/GroupBlock.js +2 -2
  92. package/checkbox/index.js +2 -2
  93. package/chunk/B6r8jPCd.js +6 -0
  94. package/chunk/{DLBfXSnU.js → BmulTYLW.js} +2880 -2878
  95. package/chunk/C9oo3EJI.js +692 -0
  96. package/chunk/{C5X4hOkx.js → CVSWh4ZZ.js} +80 -80
  97. package/chunk/DILUZgXW.js +1464 -0
  98. package/chunk/DSRHFFrc.js +53 -0
  99. package/chunk/{yLRv5RIK.js → DdJVL_4g.js} +181 -181
  100. package/chunk/{DYspELhF.js → DlHiTTJO.js} +223 -223
  101. package/chunk/{BG7YGUsx.js → R-uQJib2.js} +119 -119
  102. package/chunk/{DEiyXzBZ.js → ev6oHWqY.js} +63 -63
  103. package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
  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 +36 -36
  108. package/color-picker/InputAlpha.js +11 -11
  109. package/color-picker/InputHex.js +24 -24
  110. package/color-picker/InputRgb.js +23 -23
  111. package/color-picker/Palette.js +18 -18
  112. package/color-picker/Panel.js +2 -2
  113. package/color-picker/index.js +2 -2
  114. package/comment/index.js +31 -31
  115. package/config-provider/ConfigProvider.js +5 -3
  116. package/config-provider/context.js +2 -2
  117. package/config-provider/index.js +4 -3
  118. package/copy/index.js +28 -28
  119. package/date-picker/Picker.js +276 -276
  120. package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
  121. package/date-picker/index.js +26 -27
  122. package/descriptions/index.js +33 -33
  123. package/divider/index.js +12 -12
  124. package/draggable/index.js +23 -23
  125. package/drawer/Drawer.js +81 -81
  126. package/dropdown/Button.js +1 -1
  127. package/dropdown/index.js +56 -56
  128. package/empty/index.js +1 -1
  129. package/form/Form.js +76 -76
  130. package/form/FormItem.js +64 -64
  131. package/form/context.js +1 -1
  132. package/grid/Col.js +53 -53
  133. package/grid/Row.js +34 -34
  134. package/grid/grid-item.js +29 -29
  135. package/grid/grid.js +50 -50
  136. package/icon/index.js +20 -19
  137. package/icon-hover/index.js +1 -1
  138. package/image/Image.js +86 -86
  139. package/image/ImagePreview.js +2 -2
  140. package/image/ImagePreviewArrow.js +22 -22
  141. package/image/ImagePreviewGroup.js +1 -1
  142. package/image/index.js +1 -1
  143. package/index.js +498 -493
  144. package/input/Button.js +11 -0
  145. package/input/Group.js +8 -8
  146. package/input/Input.js +488 -434
  147. package/input/InputElement.js +1 -1
  148. package/input/Password.js +1 -1
  149. package/input/Search.js +1 -1
  150. package/input/Textarea.js +1 -1
  151. package/input/index.js +9 -8
  152. package/input-number/index.js +1 -1
  153. package/input-tag/InputTag.js +40 -40
  154. package/layout/Content.js +7 -7
  155. package/layout/Footer.js +9 -9
  156. package/layout/Header.js +7 -7
  157. package/layout/Sider.js +55 -55
  158. package/layout/index.js +32 -32
  159. package/link/index.js +35 -35
  160. package/list/Item.js +29 -29
  161. package/list/Meta.js +12 -12
  162. package/list/index.js +2 -2
  163. package/mentions/index.js +2 -2
  164. package/menu/Menu.js +2 -2
  165. package/menu/OverflowWrap.js +1 -1
  166. package/menu/index.js +2 -2
  167. package/message/index.js +1 -1
  168. package/message/useMessage.js +1 -1
  169. package/modal/Confirm.js +2 -2
  170. package/modal/Modal.js +2 -2
  171. package/modal/index.js +1 -1
  172. package/notice/index.js +1 -1
  173. package/notification/index.js +5 -5
  174. package/notification/useNotification.js +1 -1
  175. package/overflow-ellipsis/OverflowItem.js +12 -12
  176. package/overflow-ellipsis/index.js +24 -24
  177. package/package.json +1 -1
  178. package/page-header/index.js +38 -38
  179. package/pagination/PageItem.js +16 -16
  180. package/pagination/PageJumper.js +1 -1
  181. package/pagination/PageOption.js +2 -2
  182. package/pagination/Pagination.js +2 -2
  183. package/pagination/index.js +1 -1
  184. package/picker/Input.js +69 -69
  185. package/picker/InputRange.js +111 -111
  186. package/popconfirm/index.js +61 -61
  187. package/popover/index.js +35 -35
  188. package/progress/index.js +22 -22
  189. package/radio/Group.js +2 -2
  190. package/radio/GroupBlock.js +2 -2
  191. package/radio/Radio.js +2 -2
  192. package/radio/index.js +2 -2
  193. package/rate/index.js +49 -49
  194. package/resize-box/ResizeTrigger.js +34 -34
  195. package/resize-box/Split.js +56 -56
  196. package/resize-box/SplitGroup.js +55 -55
  197. package/resize-box/index.js +51 -51
  198. package/result/index.js +41 -41
  199. package/select/Option.js +1 -1
  200. package/select/Select.js +2 -2
  201. package/select/index.js +2 -2
  202. package/select/util.js +1 -1
  203. package/select-view/Core.js +125 -125
  204. package/skeleton/index.js +20 -20
  205. package/slider/Button.js +57 -57
  206. package/slider/index.js +116 -116
  207. package/space/index.js +46 -44
  208. package/speech-synthesis/index.js +1 -1
  209. package/spin/DotLoading.js +10 -10
  210. package/spin/index.js +44 -44
  211. package/statistic/Countdown.js +34 -34
  212. package/statistic/index.js +67 -67
  213. package/steps/index.js +55 -55
  214. package/style.css +1 -1
  215. package/switch/index.js +54 -54
  216. package/table/Table.js +3 -3
  217. package/table/index.js +1 -1
  218. package/tabs/Tab.js +2 -2
  219. package/tabs/TabContent.js +2 -2
  220. package/tabs/TabPane.js +12 -12
  221. package/tabs/index.js +2 -2
  222. package/tag/index.js +45 -45
  223. package/time-picker/Picker.js +76 -76
  224. package/time-picker/TimePicker.js +136 -136
  225. package/time-picker/index.js +8 -8
  226. package/time-picker/util.js +5 -5
  227. package/timeline/Item.js +47 -47
  228. package/timeline/Timeline.js +41 -41
  229. package/tooltip/index.js +29 -29
  230. package/transfer/Item.js +2 -2
  231. package/transfer/List.js +2 -2
  232. package/transfer/index.js +2 -2
  233. package/tree/Animation.js +2 -2
  234. package/tree/Node.js +2 -2
  235. package/tree/NodeList.js +1 -1
  236. package/tree/Tree.js +2 -2
  237. package/tree/index.js +1 -1
  238. package/tree-select/List.js +1 -1
  239. package/tree-select/Select.js +2 -2
  240. package/tree-select/index.js +2 -2
  241. package/trigger/index.js +60 -60
  242. package/types/config-provider/ConfigProvider.d.ts +2 -2
  243. package/types/config-provider/context.d.ts +1 -1
  244. package/types/date-picker/index.d.ts +8 -9
  245. package/types/date-picker/interface.d.ts +9 -9
  246. package/types/index.d.ts +2 -2
  247. package/types/input/Button.d.ts +5 -0
  248. package/types/input/Input.d.ts +4 -1
  249. package/types/input/interface.d.ts +7 -0
  250. package/types/picker/Input.d.ts +2 -2
  251. package/types/space/index.d.ts +2 -1
  252. package/types/utils/index.d.ts +1 -0
  253. package/types/utils/names.d.ts +1 -1
  254. package/types/utils/setTheme.d.ts +2 -0
  255. package/typography/Base.js +53 -53
  256. package/typography/Ellipsis.js +10 -8
  257. package/typography/Operations.js +28 -28
  258. package/typography/Paragraph.js +8 -8
  259. package/typography/Typography.js +7 -7
  260. package/typography/index.js +1 -1
  261. package/upload/TriggerNode.js +47 -47
  262. package/upload/Upload.js +184 -184
  263. package/upload/request.js +1 -1
  264. package/upload/request_.js +1 -1
  265. package/utils/constant.js +1 -1
  266. package/utils/contextHolder.js +3 -3
  267. package/utils/dom.js +1 -1
  268. package/utils/index.js +116 -114
  269. package/utils/names.js +1 -1
  270. package/utils/setDarkTheme.js +23 -22
  271. package/utils/setPrimaryColor.js +22 -16
  272. package/utils/setTheme.js +9 -0
  273. package/utils/tween.js +1 -1
  274. package/verification-code/VerificationCode.js +49 -49
  275. package/version/index.js +1 -1
  276. package/watermark/Watermark.js +24 -24
  277. package/chunk/CQvM33Vg.js +0 -724
  278. package/chunk/D0ZWT7db.js +0 -5
  279. package/chunk/yhU2zeeu.js +0 -1461
  280. /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/space/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { jsx as a, jsxs as A } from "react/jsx-runtime";
2
- import L from "lodash/isArray";
3
- import M from "lodash/isNumber";
4
- import P, { forwardRef as b, useContext as j } from "react";
5
- import { a as k } from "../chunk/CQvM33Vg.js";
1
+ import { jsx as s, jsxs as L } from "react/jsx-runtime";
2
+ import M from "lodash/isArray";
3
+ import V from "lodash/isNumber";
4
+ import b, { forwardRef as h, useContext as j } from "react";
5
+ import { a as k } from "../chunk/C9oo3EJI.js";
6
6
  import { u as D } from "../chunk/BFTV6myl.js";
7
7
  import F from "@unicom-cloud/utils/class-name";
8
8
  import H from "./toArray.js";
@@ -10,33 +10,33 @@ const O = {
10
10
  size: "small",
11
11
  direction: "horizontal"
12
12
  };
13
- function V(c, m) {
14
- const { getPrefixCls: N, componentConfig: l, rtl: d } = j(k), v = D(
13
+ function P(c, m) {
14
+ const { getPrefixCls: l, componentConfig: p, rtl: $ } = j(k), S = D(
15
15
  c,
16
16
  O,
17
- l == null ? void 0 : l.Space
17
+ p == null ? void 0 : p.Space
18
18
  ), {
19
- className: S,
20
- style: x,
19
+ className: w,
20
+ style: B,
21
21
  children: C,
22
22
  size: i,
23
- direction: s,
24
- align: w,
23
+ direction: o,
24
+ align: R,
25
25
  wrap: u,
26
26
  split: f,
27
- ...B
28
- } = v, e = N("space"), $ = w || (s === "horizontal" ? "center" : ""), R = F(
27
+ ...x
28
+ } = S, e = l == null ? void 0 : l("space"), y = R || (o === "horizontal" ? "center" : ""), z = F(
29
29
  e,
30
30
  {
31
- [`${e}-${s}`]: s,
32
- [`${e}-align-${$}`]: $,
31
+ [`${e}-${o}`]: o,
32
+ [`${e}-align-${y}`]: y,
33
33
  [`${e}-wrap`]: u,
34
- [`${e}-rtl`]: d
34
+ [`${e}-rtl`]: $
35
35
  },
36
- S
36
+ w
37
37
  );
38
- function p(r) {
39
- if (M(r))
38
+ function g(r) {
39
+ if (V(r))
40
40
  return r;
41
41
  switch (r) {
42
42
  case "mini":
@@ -51,40 +51,42 @@ function V(c, m) {
51
51
  return 8;
52
52
  }
53
53
  }
54
- const y = H(C);
55
- function z(r) {
56
- const n = y.length === r + 1, o = d ? "marginLeft" : "marginRight";
54
+ const N = H(C);
55
+ function A(r) {
56
+ const n = N.length === r + 1, a = $ ? "marginLeft" : "marginRight";
57
57
  if (typeof i == "string" || typeof i == "number") {
58
- const t = p(i);
58
+ const t = g(i);
59
59
  return u ? n ? { marginBottom: t } : {
60
- [`${o}`]: t,
60
+ [`${a}`]: t,
61
61
  marginBottom: t
62
62
  } : n ? {} : {
63
- [s === "vertical" ? "marginBottom" : o]: t
63
+ [o === "vertical" ? "marginBottom" : a]: t
64
64
  };
65
65
  }
66
- if (L(i)) {
67
- const t = p(i[0]), g = p(i[1]);
68
- return u ? n ? { marginBottom: g } : {
69
- [`${o}`]: t,
70
- marginBottom: g
71
- } : s === "vertical" ? { marginBottom: g } : { [`${o}`]: t };
66
+ if (M(i)) {
67
+ const t = g(i[0]), d = g(i[1]);
68
+ return u ? n ? { marginBottom: d } : {
69
+ [`${a}`]: t,
70
+ marginBottom: d
71
+ } : o === "vertical" ? { marginBottom: d } : { [`${a}`]: t };
72
72
  }
73
73
  }
74
- return /* @__PURE__ */ a("div", { ref: m, className: R, style: x, ...B, children: y.map((r, n) => {
75
- const o = (r == null ? void 0 : r.key) || n, t = f != null && n > 0;
76
- return /* @__PURE__ */ A(P.Fragment, { children: [
77
- t && /* @__PURE__ */ a("div", { className: `${e}-item-split`, children: f }),
78
- /* @__PURE__ */ a("div", { className: `${e}-item`, style: z(n), children: r })
79
- ] }, o);
74
+ return /* @__PURE__ */ s("div", { ref: m, className: z, style: B, ...x, children: N.map((r, n) => {
75
+ const a = (r == null ? void 0 : r.key) || n, t = f != null && n > 0;
76
+ return /* @__PURE__ */ L(b.Fragment, { children: [
77
+ t && /* @__PURE__ */ s("div", { className: `${e}-item-split`, children: f }),
78
+ /* @__PURE__ */ s("div", { className: `${e}-item`, style: A(n), children: r })
79
+ ] }, a);
80
80
  }) });
81
81
  }
82
- const h = b(V);
83
- h.displayName = "Space";
84
- function U(c, m) {
85
- return /* @__PURE__ */ a(h, { ref: m, direction: "vertical", children: c.children });
82
+ const v = h(P);
83
+ v.displayName = "Space";
84
+ function q(c, m) {
85
+ return /* @__PURE__ */ s(v, { ref: m, direction: "vertical", children: c.children });
86
86
  }
87
+ const E = h(q);
88
+ E.displayName = "SpaceVertical";
87
89
  export {
88
- U as SpaceVertical,
89
- h as default
90
+ E as SpaceVertical,
91
+ v as default
90
92
  };
@@ -39,7 +39,7 @@ import "@unicom-cloud/utils/file/saveAs";
39
39
  import "@unicom-cloud/utils/screenfull";
40
40
  import "@unicom-cloud/utils/constant/ui";
41
41
  import "@unicom-cloud/utils/tree";
42
- import "@unicom-cloud/utils/is";
42
+ import "lodash/isFunction";
43
43
  import "uuid";
44
44
  import "../chunk/DEuVgCzp.js";
45
45
  import g from "@unicom-cloud/icons/IconUiMute";
@@ -1,24 +1,24 @@
1
- import { jsx as s } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import m from "lodash/isNumber";
3
3
  import { useContext as a } from "react";
4
- import { a as l } from "../chunk/CQvM33Vg.js";
5
- function g(t) {
6
- const { getPrefixCls: r } = a(l), i = `${r("spin")}-dot`, n = {
4
+ import { a as d } from "../chunk/C9oo3EJI.js";
5
+ function z(t) {
6
+ const { getPrefixCls: e } = a(d), s = `${e == null ? void 0 : e("spin")}-dot`, o = {
7
7
  width: t.size,
8
8
  height: t.size
9
- }, e = t.size ? parseInt(String(t.size)) : 0;
10
- return /* @__PURE__ */ s(
9
+ }, i = t.size ? parseInt(String(t.size)) : 0;
10
+ return /* @__PURE__ */ n(
11
11
  "div",
12
12
  {
13
- className: `${i}-list`,
13
+ className: `${s}-list`,
14
14
  style: {
15
15
  height: t.size,
16
- width: m(e) && e > 0 ? e * 7 : ""
16
+ width: m(i) && i > 0 ? i * 7 : ""
17
17
  },
18
- children: [...new Array(5)].map((d, o) => /* @__PURE__ */ s("div", { className: i, style: n }, o))
18
+ children: [...new Array(5)].map((c, r) => /* @__PURE__ */ n("div", { className: s, style: o }, r))
19
19
  }
20
20
  );
21
21
  }
22
22
  export {
23
- g as default
23
+ z as default
24
24
  };
package/spin/index.js CHANGED
@@ -1,69 +1,69 @@
1
- import { jsx as n, jsxs as c, Fragment as N } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as d, Fragment as h } from "react/jsx-runtime";
2
2
  import E from "@unicom-cloud/icons/IconUiLoading";
3
3
  import I from "lodash/debounce";
4
- import $, { useContext as j, useState as w, useCallback as P, useRef as D, useImperativeHandle as F, useEffect as H } from "react";
5
- import { a as M } from "../chunk/CQvM33Vg.js";
6
- import { u as U } from "../chunk/BFTV6myl.js";
7
- import h from "@unicom-cloud/utils/class-name";
8
- import { c as _ } from "../chunk/ClM74To2.js";
9
- import q from "./DotLoading.js";
10
- function A(y, S) {
11
- const { getPrefixCls: x, componentConfig: t } = j(M), v = U(y, {}, t == null ? void 0 : t.Spin), {
12
- style: C,
13
- className: L,
4
+ import y, { useContext as j, useState as w, useCallback as D, useRef as F, useImperativeHandle as H, useEffect as M } from "react";
5
+ import { a as U } from "../chunk/C9oo3EJI.js";
6
+ import { u as _ } from "../chunk/BFTV6myl.js";
7
+ import $ from "@unicom-cloud/utils/class-name";
8
+ import { c as q } from "../chunk/ClM74To2.js";
9
+ import A from "./DotLoading.js";
10
+ function B(S, v) {
11
+ const { getPrefixCls: t, componentConfig: c } = j(U), L = _(S, {}, c == null ? void 0 : c.Spin), {
12
+ style: b,
13
+ className: x,
14
14
  children: r,
15
- loading: i,
16
- size: a,
17
- icon: d,
18
- element: b,
15
+ loading: a,
16
+ size: i,
17
+ icon: m,
18
+ element: R,
19
19
  tip: o,
20
- dot: R,
20
+ dot: z,
21
21
  delay: s,
22
- block: z = !1,
22
+ block: C = !1,
23
23
  ...k
24
- } = v, [m, p] = w(s ? !1 : i), l = P(I(p, s), [s]), f = s ? m : i, e = x("spin"), u = D(null);
25
- F(S, () => ({
24
+ } = L, [p, f] = w(s ? !1 : a), l = D(I(f, s), [s]), u = s ? p : a, e = t == null ? void 0 : t("spin"), g = F(null);
25
+ H(v, () => ({
26
26
  // 潘启宝添加于 2023年10月23日 星期一 10时52分55秒 CST
27
- dom: u.current,
28
- loading: m,
29
- setLoading: p,
27
+ dom: g.current,
28
+ loading: p,
29
+ setLoading: f,
30
30
  debouncedSetLoading: l
31
- })), H(() => (s && l(i), () => {
31
+ })), M(() => (s && l(a), () => {
32
32
  l && l.cancel();
33
- }), [i]);
34
- const g = /* @__PURE__ */ n("span", { className: `${e}-icon`, children: d ? $.cloneElement(d, {
35
- className: h(`${e.replace("-spin", "-icon")}-loading`),
33
+ }), [a]);
34
+ const N = /* @__PURE__ */ n("span", { className: `${e}-icon`, children: m ? y.cloneElement(m, {
35
+ className: $(`${e.replace("-spin", "-icon")}-loading`),
36
36
  style: {
37
- fontSize: a
37
+ fontSize: i
38
38
  }
39
- }) : b || (R ? /* @__PURE__ */ n(q, { size: a }) : /* @__PURE__ */ n(E, { style: { fontSize: a } })) });
39
+ }) : R || (z ? /* @__PURE__ */ n(A, { size: i }) : /* @__PURE__ */ n(E, { style: { fontSize: i } })) });
40
40
  return /* @__PURE__ */ n(
41
41
  "div",
42
42
  {
43
- ref: u,
44
- className: h(
43
+ ref: g,
44
+ className: $(
45
45
  e,
46
46
  {
47
- [`${e}-block`]: z,
48
- [`${e}-loading`]: f,
47
+ [`${e}-block`]: C,
48
+ [`${e}-loading`]: u,
49
49
  [`${e}-with-tip`]: o && !r
50
50
  },
51
- L
51
+ x
52
52
  ),
53
- style: C,
53
+ style: b,
54
54
  ...k,
55
- children: _(r) ? /* @__PURE__ */ c(N, { children: [
56
- g,
55
+ children: q(r) ? /* @__PURE__ */ d(h, { children: [
56
+ N,
57
57
  o ? /* @__PURE__ */ n("div", { className: `${e}-tip`, children: o }) : null
58
- ] }) : /* @__PURE__ */ c(N, { children: [
58
+ ] }) : /* @__PURE__ */ d(h, { children: [
59
59
  /* @__PURE__ */ n("div", { className: `${e}-children`, children: r }),
60
- f && /* @__PURE__ */ n(
60
+ u && /* @__PURE__ */ n(
61
61
  "div",
62
62
  {
63
63
  className: `${e}-loading-layer`,
64
- style: { fontSize: a },
65
- children: /* @__PURE__ */ c("span", { className: `${e}-loading-layer-inner`, children: [
66
- g,
64
+ style: { fontSize: i },
65
+ children: /* @__PURE__ */ d("span", { className: `${e}-loading-layer-inner`, children: [
66
+ N,
67
67
  o ? /* @__PURE__ */ n("div", { className: `${e}-tip`, children: o }) : null
68
68
  ] })
69
69
  }
@@ -72,8 +72,8 @@ function A(y, S) {
72
72
  }
73
73
  );
74
74
  }
75
- const B = $.forwardRef(A);
76
- B.displayName = "Spin";
75
+ const G = y.forwardRef(B);
76
+ G.displayName = "Spin";
77
77
  export {
78
- B as default
78
+ G as default
79
79
  };
@@ -1,55 +1,55 @@
1
- import { jsxs as M, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as M, jsx as i } from "react/jsx-runtime";
2
2
  import T from "dayjs";
3
3
  import _ from "lodash/isFunction";
4
- import { forwardRef as E, useContext as F, useState as d, useRef as O, useEffect as P } from "react";
5
- import { a as b } from "../chunk/CQvM33Vg.js";
6
- import k from "@unicom-cloud/utils/class-name";
7
- import { g as v, a as w } from "../chunk/tamGhTJp.js";
8
- import { getDateString as N } from "./util.js";
9
- function q(a, h) {
10
- const { getPrefixCls: p } = F(b), {
4
+ import { forwardRef as E, useContext as F, useState as v, useRef as O, useEffect as b } from "react";
5
+ import { a as k } from "../chunk/C9oo3EJI.js";
6
+ import q from "@unicom-cloud/utils/class-name";
7
+ import { g as w, a as N } from "../chunk/tamGhTJp.js";
8
+ import { getDateString as h } from "./util.js";
9
+ function z(a, p) {
10
+ const { getPrefixCls: n } = F(k), {
11
11
  className: x,
12
- style: C,
13
- title: i,
14
- styleValue: g,
15
- value: y,
16
- onFinish: n,
17
- renderFormat: l,
12
+ style: y,
13
+ title: l,
14
+ styleValue: C,
15
+ value: D,
16
+ onFinish: r,
17
+ renderFormat: c,
18
18
  format: e = "HH:mm:ss",
19
- start: D = !0
20
- } = a, o = v(y, e) || T(), S = v(a.now, e), t = p("statistic"), [c, $] = d(
21
- o.diff(S, "millisecond")
22
- ), [f, j] = d(
23
- N(Math.max(c, 0), e)
24
- ), s = O(null), m = () => {
19
+ start: S = !0
20
+ } = a, o = w(D, e) || T(), g = w(a.now, e), t = n == null ? void 0 : n("statistic"), [m, $] = v(
21
+ o.diff(g, "millisecond")
22
+ ), [f, j] = v(
23
+ h(Math.max(m, 0), e)
24
+ ), s = O(null), u = () => {
25
25
  clearInterval(s.current), s.current = null;
26
26
  }, V = () => {
27
27
  s.current = setInterval(() => {
28
- const H = o.diff(w()), u = o.diff(w(), "millisecond");
29
- u <= 0 && (m(), n == null || n());
30
- const I = N(Math.max(u, 0), e);
28
+ const H = o.diff(N()), d = o.diff(N(), "millisecond");
29
+ d <= 0 && (u(), r == null || r());
30
+ const I = h(Math.max(d, 0), e);
31
31
  j(I), $(H);
32
32
  }, 1e3 / 30);
33
33
  };
34
- P(() => (!s.current && D && o.valueOf() >= Date.now() && V(), () => {
35
- m();
34
+ b(() => (!s.current && S && o.valueOf() >= Date.now() && V(), () => {
35
+ u();
36
36
  }), [a.start]);
37
- const R = _(l) ? l(c, f) : f;
37
+ const R = _(c) ? c(m, f) : f;
38
38
  return /* @__PURE__ */ M(
39
39
  "div",
40
40
  {
41
- ref: h,
42
- className: k(`${t}`, `${t}-countdown`, x),
43
- style: C,
41
+ ref: p,
42
+ className: q(`${t}`, `${t}-countdown`, x),
43
+ style: y,
44
44
  children: [
45
- i && /* @__PURE__ */ r("div", { className: `${t}-title`, children: i }),
46
- /* @__PURE__ */ r("div", { className: `${t}-content`, children: /* @__PURE__ */ r("div", { className: `${t}-value`, style: g, children: R }) })
45
+ l && /* @__PURE__ */ i("div", { className: `${t}-title`, children: l }),
46
+ /* @__PURE__ */ i("div", { className: `${t}-content`, children: /* @__PURE__ */ i("div", { className: `${t}-value`, style: C, children: R }) })
47
47
  ]
48
48
  }
49
49
  );
50
50
  }
51
- const z = E(q);
52
- z.displayName = "StatisticCountdown";
51
+ const A = E(z);
52
+ A.displayName = "StatisticCountdown";
53
53
  export {
54
- z as default
54
+ A as default
55
55
  };
@@ -1,103 +1,103 @@
1
1
  import { jsxs as l, Fragment as O, jsx as a } from "react/jsx-runtime";
2
- import { y as W, q as z } from "../chunk/BNevupAU.js";
2
+ import { I as W, q as z } from "../chunk/uKZyjtff.js";
3
3
  import A from "dayjs";
4
4
  import B from "lodash/isFunction";
5
5
  import c from "lodash/isNumber";
6
- import { forwardRef as G, useContext as J, useRef as b, useState as K, useEffect as Q, useImperativeHandle as T, useMemo as X } from "react";
7
- import { a as Y } from "../chunk/CQvM33Vg.js";
6
+ import { forwardRef as G, useContext as J, useRef as y, useState as K, useEffect as Q, useImperativeHandle as T, useMemo as X } from "react";
7
+ import { a as Y } from "../chunk/C9oo3EJI.js";
8
8
  import { u as Z } from "../chunk/BFTV6myl.js";
9
- import ee from "../skeleton/index.js";
10
- import te from "@unicom-cloud/utils/class-name";
11
- import { o as re } from "../chunk/BKKEev13.js";
12
- import oe from "./Countdown.js";
13
- function ie(D, R) {
14
- const U = {
9
+ import tt from "../skeleton/index.js";
10
+ import et from "@unicom-cloud/utils/class-name";
11
+ import { o as rt } from "../chunk/BKKEev13.js";
12
+ import ot from "./Countdown.js";
13
+ function nt(R, U) {
14
+ const V = {
15
15
  countFrom: 0,
16
16
  countDuration: 2e3
17
- }, { getPrefixCls: P, componentConfig: m, rtl: V } = J(Y), e = Z(
18
- D,
19
- U,
20
- m == null ? void 0 : m.Statistic
17
+ }, { getPrefixCls: m, componentConfig: d, rtl: j } = J(Y), t = Z(
18
+ R,
19
+ V,
20
+ d == null ? void 0 : d.Statistic
21
21
  ), {
22
- className: j,
23
- style: M,
24
- title: h,
25
- extra: S,
26
- groupSeparator: g,
22
+ className: M,
23
+ style: I,
24
+ title: S,
25
+ extra: $,
26
+ groupSeparator: F,
27
27
  precision: s,
28
- prefix: d,
28
+ prefix: p,
29
29
  suffix: u,
30
30
  format: f,
31
- renderFormat: $,
32
- styleValue: _,
33
- styleDecimal: k,
34
- loading: q,
35
- ...E
36
- } = e, n = b(), F = b(), [t, p] = K(
37
- "value" in e ? e.value : void 0
38
- ), r = P("statistic"), v = (i = e.countFrom, o = e.value) => {
39
- const { countDuration: x } = e;
40
- i !== o && (n.current = new W({
31
+ renderFormat: g,
32
+ styleValue: P,
33
+ styleDecimal: _,
34
+ loading: k,
35
+ ...q
36
+ } = t, i = y(), w = y(), [e, v] = K(
37
+ "value" in t ? t.value : void 0
38
+ ), r = m == null ? void 0 : m("statistic"), N = (n = t.countFrom, o = t.value) => {
39
+ const { countDuration: h } = t;
40
+ n !== o && (i.current = new W({
41
41
  from: {
42
- value: i
42
+ value: n
43
43
  },
44
44
  to: {
45
45
  value: o
46
46
  },
47
- duration: x,
47
+ duration: h,
48
48
  easing: z,
49
49
  onUpdate: (L) => {
50
- p(L.value.toFixed(s));
50
+ v(L.value.toFixed(s));
51
51
  },
52
52
  onFinish: () => {
53
- p(o);
53
+ v(o);
54
54
  }
55
- }), n.current.start());
55
+ }), i.current.start());
56
56
  };
57
- Q(() => (e.countUp ? (n.current && n.current.stop(), t !== e.value ? v(Number(t), e.value) : v()) : p(e.value), () => {
58
- n.current && n.current.stop(), n.current = null;
59
- }), [e.value]), T(R, () => ({
60
- countUp: v,
61
- getRootDOMNode: () => F.current
57
+ Q(() => (t.countUp ? (i.current && i.current.stop(), e !== t.value ? N(Number(e), t.value) : N()) : v(t.value), () => {
58
+ i.current && i.current.stop(), i.current = null;
59
+ }), [t.value]), T(U, () => ({
60
+ countUp: N,
61
+ getRootDOMNode: () => w.current
62
62
  }));
63
- const { int: H, decimal: N } = X(() => {
64
- let i = t;
65
- f && (i = A(t).format(f)), c(s) && s >= 0 && (i = Number(t).toFixed(s));
66
- let o = String(i).split(".")[0];
67
- const x = String(i).split(".")[1];
68
- return g && c(Number(t)) && (o = Number(o).toLocaleString("en-US")), {
63
+ const { int: E, decimal: x } = X(() => {
64
+ let n = e;
65
+ f && (n = A(e).format(f)), c(s) && s >= 0 && (n = Number(e).toFixed(s));
66
+ let o = String(n).split(".")[0];
67
+ const h = String(n).split(".")[1];
68
+ return F && c(Number(e)) && (o = Number(o).toLocaleString("en-US")), {
69
69
  int: o,
70
- decimal: x
70
+ decimal: h
71
71
  };
72
- }, [f, g, s, t]), I = B($) ? $ : (i, o) => o, w = c(Number(t)), C = /* @__PURE__ */ l(O, { children: [
73
- d != null ? /* @__PURE__ */ a("span", { className: `${r}-value-prefix`, children: d }) : null,
74
- I(t, w ? H : t)
72
+ }, [f, F, s, e]), H = B(g) ? g : (n, o) => o, b = c(Number(e)), C = /* @__PURE__ */ l(O, { children: [
73
+ p != null ? /* @__PURE__ */ a("span", { className: `${r}-value-prefix`, children: p }) : null,
74
+ H(e, b ? E : e)
75
75
  ] });
76
76
  return /* @__PURE__ */ l(
77
77
  "div",
78
78
  {
79
- className: te(`${r}`, { [`${r}-rtl`]: V }, j),
80
- style: M,
81
- ...re(E, ["value", "countUp", "countFrom", "countDuration"]),
82
- ref: F,
79
+ className: et(`${r}`, { [`${r}-rtl`]: j }, M),
80
+ style: I,
81
+ ...rt(q, ["value", "countUp", "countFrom", "countDuration"]),
82
+ ref: w,
83
83
  children: [
84
- h && /* @__PURE__ */ a("div", { className: `${r}-title`, children: h }),
84
+ S && /* @__PURE__ */ a("div", { className: `${r}-title`, children: S }),
85
85
  /* @__PURE__ */ l("div", { className: `${r}-content`, children: [
86
86
  /* @__PURE__ */ a(
87
- ee,
87
+ tt,
88
88
  {
89
89
  animation: !0,
90
- loading: !!q,
90
+ loading: !!k,
91
91
  text: { rows: 1, width: "100%" },
92
- children: /* @__PURE__ */ l("div", { className: `${r}-value`, style: _, children: [
93
- w ? /* @__PURE__ */ a("span", { className: `${r}-value-int`, children: C }) : C,
94
- N !== void 0 || u ? /* @__PURE__ */ l(
92
+ children: /* @__PURE__ */ l("div", { className: `${r}-value`, style: P, children: [
93
+ b ? /* @__PURE__ */ a("span", { className: `${r}-value-int`, children: C }) : C,
94
+ x !== void 0 || u ? /* @__PURE__ */ l(
95
95
  "span",
96
96
  {
97
97
  className: `${r}-value-decimal`,
98
- style: k,
98
+ style: _,
99
99
  children: [
100
- c(Number(t)) && N !== void 0 && `.${N}`,
100
+ c(Number(e)) && x !== void 0 && `.${x}`,
101
101
  u != null ? /* @__PURE__ */ a("span", { className: `${r}-value-suffix`, children: u }) : null
102
102
  ]
103
103
  }
@@ -105,16 +105,16 @@ function ie(D, R) {
105
105
  ] })
106
106
  }
107
107
  ),
108
- S && /* @__PURE__ */ a("div", { className: `${r}-extra`, children: S })
108
+ $ && /* @__PURE__ */ a("div", { className: `${r}-extra`, children: $ })
109
109
  ] })
110
110
  ]
111
111
  }
112
112
  );
113
113
  }
114
- const ne = G(ie), y = ne;
115
- y.displayName = "Statistic";
116
- y.Countdown = oe;
114
+ const it = G(nt), D = it;
115
+ D.displayName = "Statistic";
116
+ D.Countdown = ot;
117
117
  export {
118
- oe as StatisticCountdown,
119
- y as default
118
+ ot as StatisticCountdown,
119
+ D as default
120
120
  };