@unicom-cloud/ui 0.8.78 → 0.8.80

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 (345) hide show
  1. package/Affix.js +3 -3
  2. package/Alert.js +3 -3
  3. package/AutoComplete.js +5 -5
  4. package/BackTop.js +5 -5
  5. package/Badge.js +3 -3
  6. package/Breadcrumb.js +4 -4
  7. package/Button.js +2 -2
  8. package/Calendar.js +4 -4
  9. package/Card.js +2 -2
  10. package/Carousel.js +2 -2
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +3 -3
  15. package/Comment.js +2 -2
  16. package/ConfigProvider.js +1 -1
  17. package/Copy.js +4 -4
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +2 -2
  20. package/Divider.js +2 -2
  21. package/Draggable.js +2 -2
  22. package/Dropdown.js +5 -5
  23. package/Empty.js +2 -2
  24. package/Icon.js +9 -5
  25. package/IconHover.js +2 -2
  26. package/Image.js +1 -1
  27. package/InputNumber.js +3 -3
  28. package/Layout.js +2 -2
  29. package/Link.js +3 -3
  30. package/List.js +4 -4
  31. package/Mentions.js +5 -5
  32. package/Menu.js +1 -1
  33. package/Message.js +3 -3
  34. package/Modal.js +1 -1
  35. package/Notice.js +9 -8
  36. package/Notification.js +3 -3
  37. package/OverflowEllipsis.js +2 -2
  38. package/PageHeader.js +3 -3
  39. package/Pagination.js +1 -1
  40. package/Popconfirm.js +3 -3
  41. package/Popover.js +3 -3
  42. package/Progress.js +2 -2
  43. package/Radio.js +1 -1
  44. package/Rate.js +3 -3
  45. package/ResizeBox.js +3 -3
  46. package/Result.js +2 -2
  47. package/Select.js +1 -1
  48. package/SelectView.js +5 -6
  49. package/Skeleton.js +2 -2
  50. package/Slider.js +4 -4
  51. package/Space.js +2 -2
  52. package/SpeechSynthesis.js +18 -20
  53. package/Spin.js +3 -3
  54. package/Statistic.js +3 -3
  55. package/Steps.js +2 -2
  56. package/Switch.js +7 -8
  57. package/Table.js +1 -1
  58. package/Tabs.js +1 -1
  59. package/Tag.js +3 -3
  60. package/Tooltip.js +3 -3
  61. package/Transfer.js +4 -4
  62. package/Tree.js +1 -1
  63. package/TreeSelect.js +1 -1
  64. package/Trigger.js +9 -10
  65. package/Typography.js +1 -1
  66. package/affix/index.js +17 -17
  67. package/alert/index.js +13 -13
  68. package/anchor/Anchor.js +40 -40
  69. package/anchor/Link.js +14 -14
  70. package/anchor/util.js +2 -2
  71. package/auto-complete/index.js +5 -5
  72. package/avatar/Avatar.js +17 -17
  73. package/avatar/Group.js +13 -13
  74. package/back-top/index.js +18 -18
  75. package/badge/Count.js +13 -13
  76. package/badge/index.js +21 -21
  77. package/breadcrumb/Item.js +25 -25
  78. package/breadcrumb/index.js +12 -12
  79. package/button/Group.js +6 -6
  80. package/button/index.js +30 -30
  81. package/calendar/Month.js +2 -2
  82. package/calendar/Year.js +1 -1
  83. package/calendar/index.js +4 -4
  84. package/card/Grid.js +13 -13
  85. package/card/Meta.js +13 -13
  86. package/card/index.js +29 -29
  87. package/carousel/Arrow.js +6 -6
  88. package/carousel/Indicator.js +27 -27
  89. package/carousel/index.js +24 -24
  90. package/cascader/Cascader.js +8 -8
  91. package/cascader/index.js +1 -1
  92. package/cascader/util.js +1 -1
  93. package/checkbox/Checkbox.js +4 -4
  94. package/checkbox/Group.js +4 -4
  95. package/checkbox/GroupBlock.js +3 -3
  96. package/checkbox/index.js +2 -2
  97. package/chunk/{ZrBrCzQX.js → B4WG1mhs.js} +6 -7
  98. package/chunk/{CjqvxJml.js → BG7YGUsx.js} +32 -32
  99. package/chunk/BYdIoY50.js +17 -0
  100. package/chunk/{Cc_-i0o_.js → BZ3igxQN.js} +6 -7
  101. package/chunk/{uEGHykhe.js → BZ9g7J4R.js} +1 -1
  102. package/chunk/BsUZRQDT.js +23 -0
  103. package/chunk/{CBgu99gQ.js → C5X4hOkx.js} +130 -130
  104. package/chunk/{B0n0iRhF.js → CCKr5jj1.js} +1 -1
  105. package/chunk/{CNcLypMY.js → CQvM33Vg.js} +190 -189
  106. package/chunk/CXPOj2uy.js +19 -0
  107. package/chunk/{DAAff-FT.js → ClM74To2.js} +9 -10
  108. package/chunk/{RS6OAxzv.js → D-ap9qEk.js} +2 -2
  109. package/chunk/{Cwm8LL5p.js → D73Vr7fa.js} +7197 -7202
  110. package/chunk/{tpmioyz1.js → DEiyXzBZ.js} +28 -28
  111. package/chunk/{CplLA01W.js → DEuVgCzp.js} +45 -52
  112. package/chunk/{BPQXH_5i.js → DYspELhF.js} +43 -43
  113. package/chunk/DxYoPlum.js +50 -0
  114. package/chunk/{BpYX5PN4.js → NPajzdOv.js} +2 -2
  115. package/chunk/{BBkdXHrJ.js → rT6qmv-Y.js} +1 -1
  116. package/chunk/{BhBEMwvI.js → uKZyjtff.js} +20 -21
  117. package/chunk/{BC5fEyWK.js → yLRv5RIK.js} +61 -61
  118. package/chunk/{C_4I3haT.js → yhU2zeeu.js} +96 -96
  119. package/collapse/Collapse.js +4 -4
  120. package/collapse/Item.js +4 -4
  121. package/collapse/index.js +1 -1
  122. package/color-picker/ControlBar.js +22 -22
  123. package/color-picker/InputAlpha.js +1 -1
  124. package/color-picker/InputHex.js +1 -1
  125. package/color-picker/InputRgb.js +1 -1
  126. package/color-picker/Palette.js +1 -1
  127. package/color-picker/Panel.js +4 -4
  128. package/color-picker/index.js +3 -3
  129. package/comment/index.js +18 -18
  130. package/config-provider/ConfigProvider.js +2 -2
  131. package/config-provider/context.js +2 -2
  132. package/config-provider/index.js +2 -2
  133. package/copy/index.js +23 -23
  134. package/date-picker/Picker.js +41 -41
  135. package/date-picker/PickerRange.js +3 -3
  136. package/date-picker/index.js +1 -1
  137. package/descriptions/index.js +28 -28
  138. package/divider/index.js +15 -15
  139. package/draggable/Item.js +11 -11
  140. package/draggable/index.js +15 -15
  141. package/drawer/Drawer.js +31 -31
  142. package/dropdown/Button.js +1 -1
  143. package/dropdown/index.js +22 -22
  144. package/empty/index.js +2 -2
  145. package/form/Control.js +46 -46
  146. package/form/Form.js +12 -12
  147. package/form/FormItem.js +12 -12
  148. package/form/FormLabel.js +11 -11
  149. package/form/context.js +7 -6
  150. package/form/promisify.js +9 -10
  151. package/form/store.js +1 -1
  152. package/form/util.js +1 -1
  153. package/grid/Col.js +38 -38
  154. package/grid/Row.js +15 -15
  155. package/grid/grid-item.js +17 -17
  156. package/grid/grid.js +28 -28
  157. package/hooks/index.js +6 -6
  158. package/hooks/useInView.js +1 -1
  159. package/hooks/useIntersectionObserver.js +1 -1
  160. package/hooks/useKeyboardEvent.js +1 -1
  161. package/hooks/useMergeValue.js +1 -1
  162. package/hooks/useOverrideRef.js +1 -1
  163. package/hooks/usePrefersColorSchemeDark.js +1 -1
  164. package/hooks/useVerificationCode.js +30 -30
  165. package/icon/index.js +20 -16
  166. package/icon-hover/index.js +2 -2
  167. package/image/Image.js +22 -22
  168. package/image/ImageFooter.js +2 -2
  169. package/image/ImagePreview.js +11 -11
  170. package/image/ImagePreviewArrow.js +16 -16
  171. package/image/ImagePreviewGroup.js +2 -2
  172. package/image/ImagePreviewToolbar.js +7 -7
  173. package/image/TriggerForToolbar.js +7 -7
  174. package/image/index.js +1 -1
  175. package/index.js +539 -572
  176. package/input/Group.js +10 -10
  177. package/input/Input.js +213 -214
  178. package/input/InputElement.js +10 -11
  179. package/input/Password.js +4 -4
  180. package/input/Search.js +3 -3
  181. package/input/Textarea.js +7 -8
  182. package/input/useComposition.js +6 -6
  183. package/input-number/index.js +3 -3
  184. package/input-tag/InputTag.js +110 -111
  185. package/layout/Content.js +4 -4
  186. package/layout/Footer.js +6 -6
  187. package/layout/Header.js +8 -8
  188. package/layout/Sider.js +29 -29
  189. package/layout/index.js +16 -16
  190. package/link/index.js +27 -27
  191. package/list/Item.js +5 -5
  192. package/list/Meta.js +11 -11
  193. package/list/index.js +4 -4
  194. package/locale/en-US.js +1 -1
  195. package/locale/tr-TR.js +1 -1
  196. package/mentions/index.js +5 -5
  197. package/menu/Item.js +11 -11
  198. package/menu/ItemGroup.js +8 -8
  199. package/menu/Menu.js +5 -5
  200. package/menu/OverflowWrap.js +2 -2
  201. package/menu/index.js +2 -2
  202. package/message/index.js +3 -3
  203. package/message/useMessage.js +1 -1
  204. package/modal/Confirm.js +2 -2
  205. package/modal/Modal.js +7 -7
  206. package/modal/index.js +1 -1
  207. package/notice/index.js +9 -8
  208. package/notification/index.js +3 -3
  209. package/notification/useNotification.js +1 -1
  210. package/overflow-ellipsis/OverflowItem.js +6 -6
  211. package/overflow-ellipsis/index.js +27 -27
  212. package/package.json +1 -1
  213. package/page-header/index.js +3 -3
  214. package/pagination/PageItem.js +7 -7
  215. package/pagination/PageJumper.js +1 -1
  216. package/pagination/PageOption.js +3 -3
  217. package/pagination/Pagination.js +4 -4
  218. package/pagination/index.js +1 -1
  219. package/picker/Input.js +7 -7
  220. package/picker/InputRange.js +77 -77
  221. package/popconfirm/index.js +11 -11
  222. package/popover/index.js +21 -21
  223. package/progress/CircleProgress.js +14 -14
  224. package/progress/LineProgess.js +14 -14
  225. package/progress/StepProgress.js +9 -9
  226. package/progress/index.js +26 -26
  227. package/radio/Group.js +4 -4
  228. package/radio/GroupBlock.js +3 -3
  229. package/radio/Radio.js +4 -4
  230. package/radio/index.js +2 -2
  231. package/rate/index.js +16 -16
  232. package/resize-box/ResizeTrigger.js +27 -28
  233. package/resize-box/Split.js +21 -21
  234. package/resize-box/SplitGroup.js +40 -40
  235. package/resize-box/index.js +23 -23
  236. package/result/index.js +29 -29
  237. package/select/Option.js +2 -2
  238. package/select/Select.js +11 -12
  239. package/select/index.js +2 -2
  240. package/select/util.js +5 -5
  241. package/select-view/Core.js +104 -106
  242. package/select-view/index.js +22 -23
  243. package/skeleton/Image.js +14 -14
  244. package/skeleton/Text.js +16 -16
  245. package/skeleton/index.js +11 -11
  246. package/slider/Button.js +4 -4
  247. package/slider/Dot.js +9 -9
  248. package/slider/Input.js +20 -20
  249. package/slider/Tick.js +14 -14
  250. package/slider/index.js +103 -103
  251. package/slider/util.js +3 -3
  252. package/space/index.js +14 -14
  253. package/speech-synthesis/index.js +26 -28
  254. package/spin/DotLoading.js +1 -1
  255. package/spin/index.js +16 -16
  256. package/statistic/Countdown.js +17 -17
  257. package/statistic/index.js +40 -40
  258. package/steps/Step.js +8 -8
  259. package/steps/index.js +17 -17
  260. package/switch/index.js +32 -33
  261. package/table/Table.js +5 -5
  262. package/table/index.js +1 -1
  263. package/tabs/Tab.js +4 -4
  264. package/tabs/TabContent.js +3 -3
  265. package/tabs/TabPane.js +11 -11
  266. package/tabs/index.js +2 -2
  267. package/tabs/util.js +1 -1
  268. package/tag/index.js +16 -16
  269. package/time-picker/Picker.js +50 -50
  270. package/time-picker/TimeColumn.js +8 -8
  271. package/time-picker/TimePicker.js +32 -32
  272. package/time-picker/util.js +5 -5
  273. package/timeline/Item.js +15 -15
  274. package/timeline/Timeline.js +24 -24
  275. package/tooltip/index.js +23 -23
  276. package/transfer/Item.js +4 -4
  277. package/transfer/List.js +4 -4
  278. package/transfer/index.js +4 -4
  279. package/tree/Animation.js +3 -3
  280. package/tree/Node.js +3 -3
  281. package/tree/NodeList.js +2 -2
  282. package/tree/Tree.js +4 -4
  283. package/tree/index.js +1 -1
  284. package/tree-select/List.js +2 -2
  285. package/tree-select/Select.js +8 -9
  286. package/tree-select/index.js +2 -2
  287. package/trigger/getPopupStyle.js +18 -19
  288. package/trigger/index.js +32 -33
  289. package/types/button/index.d.ts +2 -2
  290. package/types/color-picker/colors.d.ts +1 -1
  291. package/types/date-picker/util.d.ts +1 -1
  292. package/types/icon/index.d.ts +3 -1
  293. package/types/index.d.ts +1 -1
  294. package/types/menu/context.d.ts +1 -1
  295. package/typography/Base.js +33 -35
  296. package/typography/EditContent.js +16 -16
  297. package/typography/Ellipsis.js +25 -26
  298. package/typography/Operations.js +1 -1
  299. package/typography/Paragraph.js +8 -8
  300. package/typography/Typography.js +7 -7
  301. package/typography/index.js +1 -1
  302. package/upload/TriggerNode.js +8 -8
  303. package/upload/Upload.js +64 -65
  304. package/upload/Uploader.js +12 -12
  305. package/upload/request.js +13 -12
  306. package/upload/request_.js +5 -6
  307. package/utils/PqbCSSTransition.js +1 -1
  308. package/utils/caseName.js +4 -3
  309. package/utils/className.js +4 -3
  310. package/utils/constant.js +3 -3
  311. package/utils/contextHolder.js +1 -1
  312. package/utils/copy.js +5 -4
  313. package/utils/fileToURL.js +4 -3
  314. package/utils/index.js +262 -299
  315. package/utils/is.js +78 -115
  316. package/utils/keyboardCode.js +4 -26
  317. package/utils/math.js +10 -32
  318. package/utils/react19Adapter.js +1 -1
  319. package/utils/reactDOM.js +1 -1
  320. package/utils/saveAs.js +4 -3
  321. package/utils/screenfull.js +4 -3
  322. package/utils/scrollIntoView.js +1 -1
  323. package/utils/setDarkTheme.js +1 -1
  324. package/utils/tree.js +7 -83
  325. package/utils/tween.js +1 -1
  326. package/utils/validate.js +1 -1
  327. package/verification-code/VerificationCode.js +25 -25
  328. package/version/index.js +1 -1
  329. package/virtual-list/VirtualList.js +1 -1
  330. package/watermark/Watermark.js +8 -8
  331. package/chunk/ATwvJ8j2.js +0 -6
  332. package/chunk/BFmckYou.js +0 -25
  333. package/chunk/Bl7BnD1R.js +0 -119
  334. package/chunk/Bmvhjhzq.js +0 -24
  335. package/chunk/BrOW642m.js +0 -130
  336. package/chunk/C0pRaDCf.js +0 -96
  337. package/chunk/CBzE-PUr.js +0 -23
  338. package/chunk/CUFsOxJ2.js +0 -10
  339. package/chunk/Ce1j9KTi.js +0 -6
  340. package/chunk/D0Dlbc2g.js +0 -41
  341. package/chunk/DRTWRsgI.js +0 -34
  342. package/chunk/DeV0v__J.js +0 -20
  343. package/chunk/DohlrJ4S.js +0 -50
  344. package/chunk/XTEsYGuF.js +0 -17
  345. package/chunk/yl4BU7Sd.js +0 -1068
@@ -1,24 +1,18 @@
1
1
  import { jsx as p } from "react/jsx-runtime";
2
2
  import { memo as C, forwardRef as I, useState as x, useEffect as S, useImperativeHandle as U } from "react";
3
- import "../chunk/ZrBrCzQX.js";
3
+ import "../chunk/B4WG1mhs.js";
4
4
  import "../utils/dom.js";
5
- import "../chunk/DAAff-FT.js";
6
- import "../chunk/Cc_-i0o_.js";
7
- import "../chunk/Ce1j9KTi.js";
5
+ import "@unicom-cloud/utils/constant/keyboardCode";
6
+ import "../chunk/ClM74To2.js";
7
+ import "../chunk/BZ3igxQN.js";
8
+ import "@unicom-cloud/utils/constant";
8
9
  import "lodash/debounce";
9
- import "lodash/camelCase.js";
10
- import "lodash/capitalize.js";
11
- import "lodash/kebabCase.js";
12
- import "lodash/lowerFirst.js";
13
- import "lodash/snakeCase.js";
14
- import "lodash/startCase.js";
15
- import "lodash/upperFirst.js";
16
- import "lodash/uniq.js";
17
- import "../chunk/C0pRaDCf.js";
18
- import "lodash/isPlainObject.js";
10
+ import "@unicom-cloud/utils/case-name";
11
+ import "@unicom-cloud/utils/class-name";
19
12
  import "../chunk/9TSjT7x_.js";
20
- import "lodash/isString.js";
13
+ import "@unicom-cloud/utils/clipboard-copy";
21
14
  import "../chunk/tamGhTJp.js";
15
+ import "@unicom-cloud/utils/file/fileToURL";
22
16
  import "lodash/escapeRegExp";
23
17
  import "lodash/isArray";
24
18
  import "lodash/isNumber";
@@ -38,12 +32,16 @@ import "lodash/startCase";
38
32
  import "lodash/throttle";
39
33
  import "lodash/uniq";
40
34
  import "lodash/upperFirst";
41
- import "../chunk/yl4BU7Sd.js";
35
+ import "@unicom-cloud/utils/math";
42
36
  import "lodash/isPlainObject";
43
37
  import "../chunk/BJ9_azwQ.js";
44
- import "../chunk/Bl7BnD1R.js";
38
+ import "@unicom-cloud/utils/file/saveAs";
39
+ import "@unicom-cloud/utils/screenfull";
40
+ import "@unicom-cloud/utils/constant/ui";
41
+ import "@unicom-cloud/utils/tree";
42
+ import "lodash/isFunction";
45
43
  import "uuid";
46
- import "../chunk/CplLA01W.js";
44
+ import "../chunk/DEuVgCzp.js";
47
45
  import g from "@unicom-cloud/icons/IconUiMute";
48
46
  import v from "@unicom-cloud/icons/IconUiPauseCircleFill";
49
47
  import B from "@unicom-cloud/icons/IconUiPlayCircleFill";
@@ -51,14 +49,14 @@ import F from "@unicom-cloud/icons/IconUiSound";
51
49
  import H from "../button/index.js";
52
50
  function R(a) {
53
51
  function m(d, y) {
54
- const { useButton: k = !0, buttonProps: e, ...o } = d ?? {}, [s, n] = x(!1);
52
+ const { useButton: k = !0, buttonProps: i, ...o } = d ?? {}, [s, n] = x(!1);
55
53
  function u() {
56
- var i, t;
57
- (t = (i = window.speechSynthesis) == null ? void 0 : i.cancel) == null || t.call(i);
54
+ var e, t;
55
+ (t = (e = window.speechSynthesis) == null ? void 0 : e.cancel) == null || t.call(e);
58
56
  }
59
57
  function w() {
60
58
  var c, r, h;
61
- let i = ((c = o.getText) == null ? void 0 : c.call(o)) || o.text, t = new SpeechSynthesisUtterance(i);
59
+ let e = ((c = o.getText) == null ? void 0 : c.call(o)) || o.text, t = new SpeechSynthesisUtterance(e);
62
60
  t.onstart = function() {
63
61
  n(!0);
64
62
  }, t.onerror = () => {
@@ -73,14 +71,14 @@ function R(a) {
73
71
  n(!1);
74
72
  }, (h = (r = window.speechSynthesis) == null ? void 0 : r.speak) == null || h.call(r, t);
75
73
  }
76
- function f(i) {
74
+ function f(e) {
77
75
  var t;
78
- u(), s || w(), (t = e == null ? void 0 : e.onClick) == null || t.call(e, i);
76
+ u(), s || w(), (t = i == null ? void 0 : i.onClick) == null || t.call(i, e);
79
77
  }
80
78
  let l;
81
79
  if (window.speechSynthesis && window.SpeechSynthesisUtterance)
82
80
  if (k) {
83
- let { label: i, text: t, children: c, ...r } = e ?? {};
81
+ let { label: e, text: t, children: c, ...r } = i ?? {};
84
82
  l = /* @__PURE__ */ p(
85
83
  a,
86
84
  {
@@ -90,7 +88,7 @@ function R(a) {
90
88
  icon: s ? /* @__PURE__ */ p(g, {}) : /* @__PURE__ */ p(F, {}),
91
89
  ...r,
92
90
  onClick: f,
93
- children: i || t || c
91
+ children: e || t || c
94
92
  }
95
93
  );
96
94
  } else
@@ -101,10 +99,10 @@ function R(a) {
101
99
  }
102
100
  return C(I(m));
103
101
  }
104
- const Ft = R(function(m) {
102
+ const vt = R(function(m) {
105
103
  return S(() => () => {
106
104
  }, []), /* @__PURE__ */ p(H, { ...m, children: m.children });
107
105
  });
108
106
  export {
109
- Ft as default
107
+ vt as default
110
108
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as s } 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/CNcLypMY.js";
4
+ import { a as l } from "../chunk/CQvM33Vg.js";
5
5
  function g(t) {
6
6
  const { getPrefixCls: r } = a(l), i = `${r("spin")}-dot`, n = {
7
7
  width: t.size,
package/spin/index.js CHANGED
@@ -1,38 +1,38 @@
1
- import { jsx as n, jsxs as c, Fragment as h } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as c, Fragment as N } from "react/jsx-runtime";
2
2
  import E from "@unicom-cloud/icons/IconUiLoading";
3
3
  import I from "lodash/debounce";
4
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/CNcLypMY.js";
5
+ import { a as M } from "../chunk/CQvM33Vg.js";
6
6
  import { u as U } from "../chunk/BFTV6myl.js";
7
- import { p as N } from "../chunk/CUFsOxJ2.js";
8
- import { c as _ } from "../chunk/DAAff-FT.js";
7
+ import h from "@unicom-cloud/utils/class-name";
8
+ import { c as _ } from "../chunk/ClM74To2.js";
9
9
  import q from "./DotLoading.js";
10
10
  function A(y, S) {
11
- const { getPrefixCls: x, componentConfig: l } = j(M), v = U(y, {}, l == null ? void 0 : l.Spin), {
11
+ const { getPrefixCls: x, componentConfig: t } = j(M), v = U(y, {}, t == null ? void 0 : t.Spin), {
12
12
  style: C,
13
13
  className: L,
14
14
  children: r,
15
- loading: s,
15
+ loading: i,
16
16
  size: a,
17
17
  icon: d,
18
18
  element: b,
19
19
  tip: o,
20
20
  dot: R,
21
- delay: i,
21
+ delay: s,
22
22
  block: z = !1,
23
23
  ...k
24
- } = v, [m, p] = w(i ? !1 : s), t = P(I(p, i), [i]), f = i ? m : s, e = x("spin"), u = D(null);
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
25
  F(S, () => ({
26
26
  // 潘启宝添加于 2023年10月23日 星期一 10时52分55秒 CST
27
27
  dom: u.current,
28
28
  loading: m,
29
29
  setLoading: p,
30
- debouncedSetLoading: t
31
- })), H(() => (i && t(s), () => {
32
- t && t.cancel();
33
- }), [s]);
30
+ debouncedSetLoading: l
31
+ })), H(() => (s && l(i), () => {
32
+ l && l.cancel();
33
+ }), [i]);
34
34
  const g = /* @__PURE__ */ n("span", { className: `${e}-icon`, children: d ? $.cloneElement(d, {
35
- className: N(`${e.replace("-spin", "-icon")}-loading`),
35
+ className: h(`${e.replace("-spin", "-icon")}-loading`),
36
36
  style: {
37
37
  fontSize: a
38
38
  }
@@ -41,7 +41,7 @@ function A(y, S) {
41
41
  "div",
42
42
  {
43
43
  ref: u,
44
- className: N(
44
+ className: h(
45
45
  e,
46
46
  {
47
47
  [`${e}-block`]: z,
@@ -52,10 +52,10 @@ function A(y, S) {
52
52
  ),
53
53
  style: C,
54
54
  ...k,
55
- children: _(r) ? /* @__PURE__ */ c(h, { children: [
55
+ children: _(r) ? /* @__PURE__ */ c(N, { children: [
56
56
  g,
57
57
  o ? /* @__PURE__ */ n("div", { className: `${e}-tip`, children: o }) : null
58
- ] }) : /* @__PURE__ */ c(h, { children: [
58
+ ] }) : /* @__PURE__ */ c(N, { children: [
59
59
  /* @__PURE__ */ n("div", { className: `${e}-children`, children: r }),
60
60
  f && /* @__PURE__ */ n(
61
61
  "div",
@@ -2,36 +2,36 @@ import { jsxs as M, jsx as r } from "react/jsx-runtime";
2
2
  import T from "dayjs";
3
3
  import _ from "lodash/isFunction";
4
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/CNcLypMY.js";
6
- import { p as k } from "../chunk/CUFsOxJ2.js";
5
+ import { a as b } from "../chunk/CQvM33Vg.js";
6
+ import k from "@unicom-cloud/utils/class-name";
7
7
  import { g as v, a as w } from "../chunk/tamGhTJp.js";
8
- import { getDateString as p } from "./util.js";
8
+ import { getDateString as N } from "./util.js";
9
9
  function q(a, h) {
10
- const { getPrefixCls: x } = F(b), {
11
- className: C,
12
- style: g,
10
+ const { getPrefixCls: p } = F(b), {
11
+ className: x,
12
+ style: C,
13
13
  title: i,
14
- styleValue: N,
14
+ styleValue: g,
15
15
  value: y,
16
16
  onFinish: n,
17
17
  renderFormat: l,
18
18
  format: e = "HH:mm:ss",
19
19
  start: D = !0
20
- } = a, o = v(y, e) || T(), S = v(a.now, e), t = x("statistic"), [c, j] = d(
20
+ } = a, o = v(y, e) || T(), S = v(a.now, e), t = p("statistic"), [c, $] = d(
21
21
  o.diff(S, "millisecond")
22
- ), [f, V] = d(
23
- p(Math.max(c, 0), e)
22
+ ), [f, j] = d(
23
+ N(Math.max(c, 0), e)
24
24
  ), s = O(null), m = () => {
25
25
  clearInterval(s.current), s.current = null;
26
- }, $ = () => {
26
+ }, V = () => {
27
27
  s.current = setInterval(() => {
28
28
  const H = o.diff(w()), u = o.diff(w(), "millisecond");
29
29
  u <= 0 && (m(), n == null || n());
30
- const I = p(Math.max(u, 0), e);
31
- V(I), j(H);
30
+ const I = N(Math.max(u, 0), e);
31
+ j(I), $(H);
32
32
  }, 1e3 / 30);
33
33
  };
34
- P(() => (!s.current && D && o.valueOf() >= Date.now() && $(), () => {
34
+ P(() => (!s.current && D && o.valueOf() >= Date.now() && V(), () => {
35
35
  m();
36
36
  }), [a.start]);
37
37
  const R = _(l) ? l(c, f) : f;
@@ -39,11 +39,11 @@ function q(a, h) {
39
39
  "div",
40
40
  {
41
41
  ref: h,
42
- className: k(`${t}`, `${t}-countdown`, C),
43
- style: g,
42
+ className: k(`${t}`, `${t}-countdown`, x),
43
+ style: C,
44
44
  children: [
45
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: N, children: R }) })
46
+ /* @__PURE__ */ r("div", { className: `${t}-content`, children: /* @__PURE__ */ r("div", { className: `${t}-value`, style: g, children: R }) })
47
47
  ]
48
48
  }
49
49
  );
@@ -1,20 +1,20 @@
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/BhBEMwvI.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
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/CNcLypMY.js";
7
+ import { a as Y } from "../chunk/CQvM33Vg.js";
8
8
  import { u as Z } from "../chunk/BFTV6myl.js";
9
- import tt from "../skeleton/index.js";
10
- import { p as et } from "../chunk/CUFsOxJ2.js";
11
- import { o as rt } from "../chunk/BKKEev13.js";
12
- import ot from "./Countdown.js";
13
- function it(D, R) {
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
14
  const U = {
15
15
  countFrom: 0,
16
16
  countDuration: 2e3
17
- }, { getPrefixCls: P, componentConfig: m, rtl: V } = J(Y), t = Z(
17
+ }, { getPrefixCls: P, componentConfig: m, rtl: V } = J(Y), e = Z(
18
18
  D,
19
19
  U,
20
20
  m == null ? void 0 : m.Statistic
@@ -27,16 +27,16 @@ function it(D, R) {
27
27
  precision: s,
28
28
  prefix: d,
29
29
  suffix: u,
30
- format: p,
31
- renderFormat: F,
32
- styleValue: _,
33
- styleDecimal: k,
34
- loading: q,
35
- ...E
36
- } = t, n = b(), $ = b(), [e, f] = K(
37
- "value" in t ? t.value : void 0
38
- ), r = P("statistic"), v = (i = t.countFrom, o = t.value) => {
39
- const { countDuration: x } = t;
30
+ format: f,
31
+ renderFormat: $,
32
+ styleValue: I,
33
+ styleDecimal: _,
34
+ loading: k,
35
+ ...q
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
40
  i !== o && (n.current = new W({
41
41
  from: {
42
42
  value: i
@@ -47,57 +47,57 @@ function it(D, R) {
47
47
  duration: x,
48
48
  easing: z,
49
49
  onUpdate: (L) => {
50
- f(L.value.toFixed(s));
50
+ p(L.value.toFixed(s));
51
51
  },
52
52
  onFinish: () => {
53
- f(o);
53
+ p(o);
54
54
  }
55
55
  }), n.current.start());
56
56
  };
57
- Q(() => (t.countUp ? (n.current && n.current.stop(), e !== t.value ? v(Number(e), t.value) : v()) : f(t.value), () => {
57
+ Q(() => (e.countUp ? (n.current && n.current.stop(), t !== e.value ? v(Number(t), e.value) : v()) : p(e.value), () => {
58
58
  n.current && n.current.stop(), n.current = null;
59
- }), [t.value]), T(R, () => ({
59
+ }), [e.value]), T(R, () => ({
60
60
  countUp: v,
61
- getRootDOMNode: () => $.current
61
+ getRootDOMNode: () => F.current
62
62
  }));
63
- const { int: H, decimal: N } = X(() => {
64
- let i = e;
65
- p && (i = A(e).format(p)), c(s) && s >= 0 && (i = Number(e).toFixed(s));
63
+ const { int: E, decimal: N } = X(() => {
64
+ let i = t;
65
+ f && (i = A(t).format(f)), c(s) && s >= 0 && (i = Number(t).toFixed(s));
66
66
  let o = String(i).split(".")[0];
67
67
  const x = String(i).split(".")[1];
68
- return g && c(Number(e)) && (o = Number(o).toLocaleString("en-US")), {
68
+ return g && c(Number(t)) && (o = Number(o).toLocaleString("en-US")), {
69
69
  int: o,
70
70
  decimal: x
71
71
  };
72
- }, [p, g, s, e]), I = B(F) ? F : (i, o) => o, w = c(Number(e)), C = /* @__PURE__ */ l(O, { children: [
72
+ }, [f, g, s, t]), H = B($) ? $ : (i, o) => o, w = c(Number(t)), C = /* @__PURE__ */ l(O, { children: [
73
73
  d != null ? /* @__PURE__ */ a("span", { className: `${r}-value-prefix`, children: d }) : null,
74
- I(e, w ? H : e)
74
+ H(t, w ? E : t)
75
75
  ] });
76
76
  return /* @__PURE__ */ l(
77
77
  "div",
78
78
  {
79
- className: et(`${r}`, { [`${r}-rtl`]: V }, j),
79
+ className: te(`${r}`, { [`${r}-rtl`]: V }, j),
80
80
  style: M,
81
- ...rt(E, ["value", "countUp", "countFrom", "countDuration"]),
82
- ref: $,
81
+ ...re(q, ["value", "countUp", "countFrom", "countDuration"]),
82
+ ref: F,
83
83
  children: [
84
84
  h && /* @__PURE__ */ a("div", { className: `${r}-title`, children: h }),
85
85
  /* @__PURE__ */ l("div", { className: `${r}-content`, children: [
86
86
  /* @__PURE__ */ a(
87
- tt,
87
+ ee,
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: [
92
+ children: /* @__PURE__ */ l("div", { className: `${r}-value`, style: I, children: [
93
93
  w ? /* @__PURE__ */ a("span", { className: `${r}-value-int`, children: C }) : C,
94
94
  N !== 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(e)) && N !== void 0 && `.${N}`,
100
+ c(Number(t)) && N !== void 0 && `.${N}`,
101
101
  u != null ? /* @__PURE__ */ a("span", { className: `${r}-value-suffix`, children: u }) : null
102
102
  ]
103
103
  }
@@ -111,10 +111,10 @@ function it(D, R) {
111
111
  }
112
112
  );
113
113
  }
114
- const nt = G(it), y = nt;
114
+ const ne = G(ie), y = ne;
115
115
  y.displayName = "Statistic";
116
- y.Countdown = ot;
116
+ y.Countdown = oe;
117
117
  export {
118
- ot as StatisticCountdown,
118
+ oe as StatisticCountdown,
119
119
  y as default
120
120
  };
package/steps/Step.js CHANGED
@@ -2,7 +2,7 @@ import { jsx as s, jsxs as h } from "react/jsx-runtime";
2
2
  import R from "@unicom-cloud/icons/IconUiCheck";
3
3
  import W from "@unicom-cloud/icons/IconUiClose";
4
4
  import { forwardRef as q } from "react";
5
- import { p as z } from "../chunk/CUFsOxJ2.js";
5
+ import z from "@unicom-cloud/utils/class-name";
6
6
  function A(x, S) {
7
7
  const {
8
8
  style: C,
@@ -16,11 +16,11 @@ function A(x, S) {
16
16
  icon: l,
17
17
  nextStepError: w,
18
18
  type: p,
19
- customDot: u,
19
+ customDot: N,
20
20
  labelPlacement: y,
21
- disabled: N,
22
- onClick: m,
23
- onChange: a,
21
+ disabled: u,
22
+ onClick: a,
23
+ onChange: m,
24
24
  direction: I,
25
25
  id: $,
26
26
  lineless: j
@@ -32,7 +32,7 @@ function A(x, S) {
32
32
  return l ? n = l : c === "finish" ? n = /* @__PURE__ */ s(R, {}) : c === "error" && (n = /* @__PURE__ */ s(W, {})), /* @__PURE__ */ s("div", { className: `${e}-icon`, children: n });
33
33
  }
34
34
  function D(c) {
35
- N || (o !== i && (a == null || a(i, $)), m == null || m(i, $, c));
35
+ u || (o !== i && (m == null || m(i, $)), a == null || a(i, $, c));
36
36
  }
37
37
  let t;
38
38
  d ? t = d : (o < i && (t = "wait"), o === i && (t = "process"), o > i && (t = "finish"));
@@ -42,11 +42,11 @@ function A(x, S) {
42
42
  {
43
43
  [`${e}-item-custom`]: !!l,
44
44
  [`${e}-item-next-error`]: w,
45
- [`${e}-item-disabled`]: N,
45
+ [`${e}-item-disabled`]: u,
46
46
  [`${e}-item-active`]: i === o
47
47
  },
48
48
  b
49
- ), U = k(t), v = /* @__PURE__ */ s("div", { className: `${e}-item-icon`, children: U }), P = u ? u(v, {
49
+ ), U = k(t), v = /* @__PURE__ */ s("div", { className: `${e}-item-icon`, children: U }), P = N ? N(v, {
50
50
  index: i,
51
51
  status: t,
52
52
  title: f,
package/steps/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as w } from "react/jsx-runtime";
2
2
  import d, { forwardRef as D, useContext as R } from "react";
3
- import { a as k } from "../chunk/CNcLypMY.js";
3
+ import { a as k } from "../chunk/CQvM33Vg.js";
4
4
  import { u as A } from "../chunk/BFTV6myl.js";
5
- import { p as E } from "../chunk/CUFsOxJ2.js";
5
+ import E from "@unicom-cloud/utils/class-name";
6
6
  import { a as j } from "../chunk/ClqoGc3r.js";
7
7
  import F from "./Step.js";
8
8
  const I = {
@@ -13,33 +13,33 @@ const I = {
13
13
  labelPlacement: "horizontal"
14
14
  };
15
15
  function L($, y) {
16
- const { getPrefixCls: z, componentConfig: a, rtl: C } = R(k), l = A(
16
+ const { getPrefixCls: z, componentConfig: a, rtl: C } = R(k), i = A(
17
17
  $,
18
18
  I,
19
19
  a == null ? void 0 : a.Steps
20
20
  ), {
21
21
  className: P,
22
22
  style: h,
23
- children: b,
23
+ children: N,
24
24
  current: n = 1,
25
25
  status: p,
26
26
  onChange: c,
27
27
  type: e,
28
- size: g,
28
+ size: b,
29
29
  direction: m,
30
- labelPlacement: v,
31
- customDot: N,
30
+ labelPlacement: g,
31
+ customDot: v,
32
32
  lineless: f
33
- } = l, t = z("steps");
34
- let o = v;
33
+ } = i, t = z("steps");
34
+ let o = g;
35
35
  e === "dot" && (o = m === "vertical" ? "horizontal" : "vertical"), e === "navigation" && (o = "horizontal");
36
- let i = m;
37
- (e === "navigation" || e === "arrow") && (i = "horizontal");
36
+ let l = m;
37
+ (e === "navigation" || e === "arrow") && (l = "horizontal");
38
38
  const x = E(
39
39
  t,
40
- `${t}-${i}`,
40
+ `${t}-${l}`,
41
41
  `${t}-label-${o}`,
42
- `${t}-size-${g}`,
42
+ `${t}-size-${b}`,
43
43
  {
44
44
  [`${t}-change-onclick`]: typeof c == "function",
45
45
  [`${t}-mode-${e}`]: e !== "default",
@@ -54,8 +54,8 @@ function L($, y) {
54
54
  ref: y,
55
55
  style: h,
56
56
  className: x,
57
- ...j(l),
58
- children: d.Children.toArray(b).filter(
57
+ ...j(i),
58
+ children: d.Children.toArray(N).filter(
59
59
  (r) => r && r.type && r.type.displayName === "Step"
60
60
  ).map((r, s) => {
61
61
  if (s += 1, r) {
@@ -65,9 +65,9 @@ function L($, y) {
65
65
  index: s,
66
66
  current: n,
67
67
  status: n === s ? p : void 0,
68
- customDot: N,
68
+ customDot: v,
69
69
  labelPlacement: o,
70
- direction: i,
70
+ direction: l,
71
71
  onChange: c,
72
72
  lineless: f,
73
73
  ...r.props