@unicom-cloud/ui 0.8.65 → 0.8.67

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 (358) hide show
  1. package/Affix.js +79 -79
  2. package/Alert.js +46 -46
  3. package/Anchor.js +1 -1
  4. package/AutoComplete.js +74 -74
  5. package/Avatar.js +36 -36
  6. package/BackTop.js +35 -35
  7. package/Badge.js +55 -55
  8. package/Breadcrumb.js +42 -42
  9. package/Button.js +24 -24
  10. package/Calendar.js +230 -230
  11. package/Card.js +18 -18
  12. package/Carousel.js +165 -165
  13. package/Cascader.js +1 -1
  14. package/Checkbox.js +1 -1
  15. package/Collapse.js +1 -1
  16. package/ColorPicker.js +26 -26
  17. package/Comment.js +18 -18
  18. package/ConfigProvider.js +2 -2
  19. package/Copy.js +28 -27
  20. package/DatePicker.js +872 -871
  21. package/Descriptions.js +34 -34
  22. package/Divider.js +19 -19
  23. package/Draggable.js +27 -26
  24. package/Drawer.js +1 -1
  25. package/Dropdown.js +110 -110
  26. package/Empty.js +3 -3
  27. package/Form.js +984 -945
  28. package/Grid.js +34 -34
  29. package/Icon.js +16 -16
  30. package/IconHover.js +2 -2
  31. package/Image.js +2 -2
  32. package/Input.js +7 -6
  33. package/InputNumber.js +6 -6
  34. package/InputTag.js +1 -1
  35. package/Layout.js +24 -24
  36. package/Link.js +30 -30
  37. package/List.js +95 -95
  38. package/Mentions.js +85 -84
  39. package/Menu.js +2 -2
  40. package/Message.js +7 -6
  41. package/Modal.js +1 -1
  42. package/Notice.js +14 -3
  43. package/Notification.js +9 -7
  44. package/OverflowEllipsis.js +64 -62
  45. package/PageHeader.js +73 -73
  46. package/Pagination.js +1 -1
  47. package/Picker.js +1 -1
  48. package/Popconfirm.js +60 -60
  49. package/Popover.js +31 -31
  50. package/Portal.js +23 -31
  51. package/Progress.js +22 -22
  52. package/Radio.js +2 -2
  53. package/Rate.js +24 -24
  54. package/ResizeBox.js +274 -271
  55. package/Result.js +3 -3
  56. package/Select.js +4 -4
  57. package/SelectView.js +257 -237
  58. package/Skeleton.js +46 -46
  59. package/Slider.js +286 -283
  60. package/Space.js +28 -28
  61. package/SpeechSynthesis.js +62 -55
  62. package/Spin.js +23 -23
  63. package/Statistic.js +80 -80
  64. package/Steps.js +67 -67
  65. package/Switch.js +47 -47
  66. package/Table.js +1463 -1395
  67. package/Tabs.js +5 -5
  68. package/Tag.js +45 -45
  69. package/TimePicker.js +154 -154
  70. package/Timeline.js +2 -2
  71. package/Tooltip.js +80 -79
  72. package/Transfer.js +103 -102
  73. package/Tree.js +3 -2
  74. package/TreeSelect.js +2 -2
  75. package/Trigger.js +699 -772
  76. package/Typography.js +756 -6
  77. package/Upload.js +2 -2
  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/{DIx0qmCq.js → -UuKKT0Z.js} +29 -29
  83. package/chunk/{B8QV6E2b.js → AwZqeapI.js} +5 -5
  84. package/chunk/B5gK1Idp.js +19 -0
  85. package/chunk/B7FlazNB.js +24 -0
  86. package/chunk/{DXZEpA3t.js → BBvWDeuZ.js} +67 -67
  87. package/chunk/BCftTxEy.js +626 -0
  88. package/chunk/{CsbCHnFk.js → BGny4zSb.js} +60 -60
  89. package/chunk/BHF15Dog.js +98 -0
  90. package/chunk/BJQ5UNa-.js +1585 -0
  91. package/chunk/BP9sYyk9.js +8 -0
  92. package/chunk/BUdtVdnv.js +38 -0
  93. package/chunk/BVQlOzTS.js +11 -0
  94. package/chunk/B__a_gb_.js +519 -0
  95. package/chunk/BbEYToV1.js +10 -0
  96. package/chunk/BbdDQAnm.js +15 -0
  97. package/chunk/BdUcgWdu.js +11 -0
  98. package/chunk/BfbXSG70.js +26 -0
  99. package/chunk/BndfNLK4.js +186 -0
  100. package/chunk/BoMCZV6K.js +1098 -0
  101. package/chunk/Br0B6y1T.js +18 -0
  102. package/chunk/BrOW642m.js +130 -0
  103. package/chunk/BxUs8_Cr.js +9 -0
  104. package/chunk/{DK4KcodH.js → C42LIMP9.js} +244 -242
  105. package/chunk/C4YkFMzC.js +778 -0
  106. package/chunk/{CF6p9R93.js → C9Wcraj7.js} +21 -21
  107. package/chunk/{4-gvEY5y.js → CANgSlh3.js} +10 -10
  108. package/chunk/CJ_o9tZM.js +5 -0
  109. package/chunk/{Bqk6yh16.js → CK5m7rLl.js} +36 -36
  110. package/chunk/{CANaGbGR.js → CKNyIitu.js} +57 -56
  111. package/chunk/CLiqJm_T.js +10 -0
  112. package/chunk/{DjtWv6Wn.js → CNmmhbCn.js} +32 -32
  113. package/chunk/{BUCEs557.js → CP0odX99.js} +51 -51
  114. package/chunk/CPT-OZH2.js +14 -0
  115. package/chunk/CVSF8p0O.js +698 -0
  116. package/chunk/C_agcwLN.js +31 -0
  117. package/chunk/{DTjcKyDN.js → C_gJWGGh.js} +201 -201
  118. package/chunk/{CPcm9Cm5.js → CaasmWg_.js} +11 -11
  119. package/chunk/Ce1j9KTi.js +6 -0
  120. package/chunk/{D_-UD4vO.js → Cf5QNhkG.js} +18 -18
  121. package/chunk/CkNSv2U7.js +56 -0
  122. package/chunk/Cp2f70gB.js +9 -0
  123. package/chunk/CpegYjdC.js +16 -0
  124. package/chunk/CucI3KZr.js +20 -0
  125. package/chunk/CwoFBTYz.js +11 -0
  126. package/chunk/D2KPqPhV.js +17 -0
  127. package/chunk/D7NyvE5f.js +17 -0
  128. package/chunk/D8oTPQ2H.js +384 -0
  129. package/chunk/{CLBavO5c.js → DC1iHEiy.js} +87 -87
  130. package/chunk/{Dnycc1qJ.js → DFrfrmfK.js} +120 -119
  131. package/chunk/DGTIZ_0O.js +6 -0
  132. package/chunk/DJfpiZn_.js +25 -0
  133. package/chunk/DKr2_PYd.js +34 -0
  134. package/chunk/DNUz6zgo.js +11 -0
  135. package/chunk/DRtM649q.js +11 -0
  136. package/chunk/DS_mUWn6.js +41 -0
  137. package/chunk/DU6bs_19.js +10 -0
  138. package/chunk/DWdbwz22.js +10 -0
  139. package/chunk/DcveZuqd.js +6 -0
  140. package/chunk/DdVFknul.js +24 -0
  141. package/chunk/DgRfikwe.js +16 -0
  142. package/chunk/{DG-epQqF.js → DkyR2EfG.js} +66 -66
  143. package/chunk/{DUeHQKtx.js → DleQ5HwG.js} +42 -42
  144. package/chunk/DnrZEnQ_.js +27 -0
  145. package/chunk/DsRSHWtX.js +1025 -0
  146. package/chunk/Dz5BdmXo.js +270 -0
  147. package/chunk/EANe01DF.js +1030 -0
  148. package/chunk/{CwhPMMWy.js → Ey4YJCkX.js} +7 -7
  149. package/chunk/GoNx5R4F.js +873 -0
  150. package/chunk/HDUQku8d.js +20 -0
  151. package/chunk/HrAP__Hi.js +25 -0
  152. package/chunk/JPPo5nY_.js +9 -0
  153. package/chunk/{CIlGCedk.js → SLWP34OR.js} +90 -85
  154. package/chunk/VVKtwaGf.js +278 -0
  155. package/chunk/WPNpLxSI.js +16 -0
  156. package/chunk/{DLvMA1OW.js → WpO_DsK4.js} +49 -48
  157. package/chunk/fdU3ang6.js +14 -0
  158. package/chunk/{DqFhzTWC.js → fkclKOAL.js} +298 -292
  159. package/chunk/flvYlqx3.js +22 -0
  160. package/chunk/kTDayEpF.js +288 -0
  161. package/chunk/{DQDkV47j.js → pZoNQ75H.js} +31 -31
  162. package/chunk/qFf1w_Jq.js +8 -0
  163. package/chunk/{CH1UUxsg.js → w-kM1L5W.js} +155 -155
  164. package/hooks/index.js +53 -49
  165. package/hooks/useComputedState.js +2 -10
  166. package/hooks/useCreate.js +2 -7
  167. package/hooks/useForceUpdate.js +2 -7
  168. package/hooks/useId.js +2 -10
  169. package/hooks/useInView.js +2 -30
  170. package/hooks/useIntersectionObserver.js +2 -23
  171. package/hooks/useInterval.js +2 -17
  172. package/hooks/useIsFirstRender.js +2 -9
  173. package/hooks/useIsomorphicLayoutEffect.js +2 -5
  174. package/hooks/useKeyboardEvent.js +2 -16
  175. package/hooks/useMedia.js +2 -15
  176. package/hooks/useMergeProps.js +2 -18
  177. package/hooks/useMergeValue.js +2 -19
  178. package/hooks/useOnlineStatus.js +4 -0
  179. package/hooks/useOverflowHidden.js +2 -25
  180. package/hooks/useOverrideRef.js +2 -13
  181. package/hooks/usePersistCallback.js +2 -13
  182. package/hooks/usePrefersColorSchemeDark.js +4 -0
  183. package/hooks/usePrevious.js +2 -9
  184. package/hooks/useRefs.js +2 -9
  185. package/hooks/useResizeObserver.js +2 -15
  186. package/hooks/useStateCallback.js +2 -15
  187. package/hooks/useStateWithPromise.js +2 -24
  188. package/hooks/useUpdateEffect.js +2 -9
  189. package/hooks/useVerificationCode.js +73 -0
  190. package/hooks/useWatch.js +2 -10
  191. package/hooks/{use-watermark.js → useWatermark.js} +27 -26
  192. package/hooks/useWindowSize.js +2 -20
  193. package/index.js +571 -584
  194. package/locale/en-US.js +4 -2
  195. package/locale/interface.js +1 -4
  196. package/locale/ja-JP.js +3 -1
  197. package/locale/tr-TR.js +1 -1
  198. package/locale/zh-CN.js +3 -1
  199. package/locale/zh-HK.js +3 -1
  200. package/locale/zh-TW.js +3 -1
  201. package/package.json +1 -1
  202. package/style.css +1 -1
  203. package/types/anchor/util.d.ts +1 -1
  204. package/types/button/index.d.ts +2 -2
  205. package/types/color-picker/hooks/useColorPicker.d.ts +2 -2
  206. package/types/form/Control-old.d.ts +56 -0
  207. package/types/form/Control.d.ts +6 -54
  208. package/types/form/FormItem.d.ts +1 -1
  209. package/types/form/store.d.ts +0 -1
  210. package/types/hooks/index.d.ts +2 -0
  211. package/types/hooks/useComputedState.d.ts +1 -4
  212. package/types/hooks/useCreate.d.ts +1 -2
  213. package/types/hooks/useForceUpdate.d.ts +1 -2
  214. package/types/hooks/useId.d.ts +1 -2
  215. package/types/hooks/useInView.d.ts +1 -11
  216. package/types/hooks/useIntersectionObserver.d.ts +1 -7
  217. package/types/hooks/useInterval.d.ts +1 -2
  218. package/types/hooks/useIsFirstRender.d.ts +1 -2
  219. package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
  220. package/types/hooks/useKeyboardEvent.d.ts +1 -8
  221. package/types/hooks/useMedia.d.ts +1 -2
  222. package/types/hooks/useMergeProps.d.ts +1 -5
  223. package/types/hooks/useMergeValue.d.ts +1 -6
  224. package/types/hooks/useOnlineStatus.d.ts +1 -0
  225. package/types/hooks/useOverflowHidden.d.ts +1 -5
  226. package/types/hooks/useOverrideRef.d.ts +1 -6
  227. package/types/hooks/usePersistCallback.d.ts +1 -2
  228. package/types/hooks/usePrefersColorSchemeDark.d.ts +1 -0
  229. package/types/hooks/usePrevious.d.ts +1 -3
  230. package/types/hooks/useRefs.d.ts +1 -2
  231. package/types/hooks/useResizeObserver.d.ts +1 -6
  232. package/types/hooks/useStateCallback.d.ts +1 -5
  233. package/types/hooks/useStateWithPromise.d.ts +1 -2
  234. package/types/hooks/useUpdateEffect.d.ts +1 -3
  235. package/types/hooks/useWatch.d.ts +1 -3
  236. package/types/hooks/useWindowSize.d.ts +1 -5
  237. package/types/image/interface.d.ts +1 -0
  238. package/types/index.d.ts +157 -86
  239. package/types/input/Input.d.ts +1 -1
  240. package/types/input/Textarea.d.ts +2 -2
  241. package/types/locale/en-US.d.ts +2 -0
  242. package/types/locale/interface.d.ts +1 -2
  243. package/types/locale/ja-JP.d.ts +2 -0
  244. package/types/locale/zh-CN.d.ts +2 -0
  245. package/types/locale/zh-HK.d.ts +2 -0
  246. package/types/locale/zh-TW.d.ts +2 -0
  247. package/types/menu/context.d.ts +1 -1
  248. package/types/message/index.d.ts +14 -14
  249. package/types/message/interface.d.ts +2 -0
  250. package/types/modal/config.d.ts +0 -1
  251. package/types/modal/interface.d.ts +0 -1
  252. package/types/notice/index.d.ts +2 -27
  253. package/types/notification/index.d.ts +15 -16
  254. package/types/notification/interface.d.ts +2 -0
  255. package/types/notification/withNotification.d.ts +2 -0
  256. package/types/select/util.d.ts +1 -2
  257. package/types/select-view/interface.d.ts +2 -1
  258. package/types/speech-synthesis/index.d.ts +1 -1
  259. package/types/table/constant.d.ts +2 -0
  260. package/types/table/hook/useThResizable.d.ts +7 -0
  261. package/types/table/index.d.ts +10 -1
  262. package/types/table/style/index.d.ts +1 -0
  263. package/types/table/th-resizable/index.d.ts +2 -0
  264. package/types/table/thead/Column.d.ts +1 -2
  265. package/types/tree/Tree.d.ts +12 -67
  266. package/types/tree-select/Select.d.ts +2 -2
  267. package/types/trigger/index.d.ts +2 -120
  268. package/types/trigger/interface.d.ts +2 -1
  269. package/types/utils/CSSTransition.d.ts +2 -3
  270. package/types/utils/caseName.d.ts +1 -1
  271. package/types/utils/className.d.ts +1 -1
  272. package/types/utils/constant.d.ts +2 -2
  273. package/types/utils/copy.d.ts +1 -1
  274. package/types/utils/dayjs.d.ts +1 -21
  275. package/types/utils/dom.d.ts +1 -6
  276. package/types/utils/fileToURL.d.ts +1 -1
  277. package/types/utils/fillNBSP.d.ts +1 -1
  278. package/types/utils/getHighlightText.d.ts +1 -5
  279. package/types/utils/getHotkeyHandler.d.ts +1 -8
  280. package/types/utils/getStringLength.d.ts +1 -1
  281. package/types/utils/include.d.ts +1 -1
  282. package/types/utils/index.d.ts +3 -4
  283. package/types/utils/is.d.ts +1 -16
  284. package/types/utils/keyboardCode.d.ts +3 -0
  285. package/types/utils/lodash.d.ts +1 -17
  286. package/types/utils/mergeProps.d.ts +1 -1
  287. package/types/utils/mergedToString.d.ts +1 -1
  288. package/types/utils/omit.d.ts +1 -1
  289. package/types/utils/pad.d.ts +1 -2
  290. package/types/utils/pick.d.ts +2 -4
  291. package/types/utils/reactDOM.d.ts +1 -7
  292. package/types/utils/resizeObserverEffect.d.ts +2 -0
  293. package/types/utils/saveAs.d.ts +1 -1
  294. package/types/utils/screenfull.d.ts +2 -0
  295. package/types/utils/scrollIntoView.d.ts +1 -2
  296. package/types/utils/style.d.ts +1 -3
  297. package/types/utils/throttleByRaf.d.ts +1 -5
  298. package/types/utils/throttleByRaf2.d.ts +1 -0
  299. package/types/utils/warning.d.ts +1 -2
  300. package/types/version/index.d.ts +1 -1
  301. package/utils/CSSTransition.js +2 -6
  302. package/utils/className.js +2 -2
  303. package/utils/constant.js +8 -9
  304. package/utils/contextHolder.js +1 -1
  305. package/utils/copy.js +1 -1
  306. package/utils/dayjs.js +14 -173
  307. package/utils/dom.js +33 -29
  308. package/utils/fillNBSP.js +2 -4
  309. package/utils/getHighlightText.js +2 -38
  310. package/utils/getHotkeyHandler.js +2 -25
  311. package/utils/getStringLength.js +2 -7
  312. package/utils/include.js +2 -7
  313. package/utils/index.js +237 -240
  314. package/utils/is.js +116 -156
  315. package/utils/keyboardCode.js +27 -0
  316. package/utils/mergeProps.js +2 -9
  317. package/utils/mergedToString.js +2 -13
  318. package/utils/omit.js +2 -9
  319. package/utils/pad.js +12 -12
  320. package/utils/pick.js +4 -15
  321. package/utils/reactDOM.js +3 -54
  322. package/utils/resizeObserverEffect.js +4 -0
  323. package/utils/saveAs.js +1 -1
  324. package/utils/screenfull.js +4 -0
  325. package/utils/scrollIntoView.js +2 -21
  326. package/utils/style.js +12 -11
  327. package/utils/throttleByRaf.js +13 -12
  328. package/utils/throttleByRaf2.js +5 -0
  329. package/utils/warning.js +5 -4
  330. package/NotificationBase.js +0 -53
  331. package/chunk/1GQdnTJp.js +0 -284
  332. package/chunk/BAWsPQBM.js +0 -11
  333. package/chunk/BS09tn7B.js +0 -638
  334. package/chunk/BqGtwxTi.js +0 -777
  335. package/chunk/BqufsN8i.js +0 -376
  336. package/chunk/BtlvlGQN.js +0 -278
  337. package/chunk/C2lIz2F9.js +0 -60
  338. package/chunk/CGZ0In1p.js +0 -776
  339. package/chunk/CWgltRVL.js +0 -698
  340. package/chunk/D3NFxdmG.js +0 -518
  341. package/chunk/DApXtulb.js +0 -1102
  342. package/chunk/DlLL5JQo.js +0 -1501
  343. package/chunk/Dv_xRzvR.js +0 -269
  344. package/chunk/Ek8U5CTN.js +0 -1032
  345. package/chunk/ewRDIDUz.js +0 -995
  346. package/chunk/l0sNRNKZ.js +0 -1
  347. package/chunk/tYXLFPVI.js +0 -871
  348. package/hooks/use-verification-code.js +0 -73
  349. package/types/notification-base/index.d.ts +0 -15
  350. package/types/notification-base/style/index.d.ts +0 -2
  351. package/types/trigger/Portal.d.ts +0 -7
  352. package/types/utils/keyCode.d.ts +0 -45
  353. package/types/utils/raf.d.ts +0 -3
  354. package/types/utils/throttleByRafV2.d.ts +0 -5
  355. package/utils/keyCode.js +0 -12
  356. package/utils/raf.js +0 -19
  357. package/utils/throttleByRafV2.js +0 -16
  358. /package/style/{variable.less → variables.less} +0 -0
package/Space.js CHANGED
@@ -1,15 +1,15 @@
1
- import { jsx as l, jsxs as M } from "react/jsx-runtime";
2
- import P from "lodash/isArray";
3
- import b from "lodash/isNumber";
4
- import v, { forwardRef as j, useContext as k } from "react";
5
- import { d as F } from "./chunk/DlLL5JQo.js";
6
- import { useMergeProps as D } from "./hooks/useMergeProps.js";
7
- import { y as E } from "./chunk/BAWsPQBM.js";
1
+ import { jsx as l, jsxs as b } from "react/jsx-runtime";
2
+ import j from "lodash/isArray";
3
+ import k from "lodash/isNumber";
4
+ import N, { forwardRef as F, useContext as M } from "react";
5
+ import { a as P } from "./chunk/BJQ5UNa-.js";
6
+ import { c as D } from "./chunk/B5gK1Idp.js";
7
+ import { m as E } from "./chunk/JPPo5nY_.js";
8
8
  import { isFragment as H } from "react-is";
9
- function N(c) {
9
+ function S(c) {
10
10
  let e = [];
11
- return v.Children.forEach(c, (n) => {
12
- H(n) && n.props ? e = e.concat(N(n.props.children)) : n != null && e.push(n);
11
+ return N.Children.forEach(c, (n) => {
12
+ H(n) && n.props ? e = e.concat(S(n.props.children)) : n != null && e.push(n);
13
13
  }), e;
14
14
  }
15
15
  const O = {
@@ -17,10 +17,10 @@ const O = {
17
17
  direction: "horizontal"
18
18
  };
19
19
  function V(c, e) {
20
- const { getPrefixCls: n, componentConfig: p, rtl: y } = k(F), C = D(
20
+ const { getPrefixCls: n, componentConfig: f, rtl: $ } = M(P), C = D(
21
21
  c,
22
22
  O,
23
- p == null ? void 0 : p.Space
23
+ f == null ? void 0 : f.Space
24
24
  ), {
25
25
  className: x,
26
26
  style: w,
@@ -28,21 +28,21 @@ function V(c, e) {
28
28
  size: s,
29
29
  direction: m,
30
30
  align: L,
31
- wrap: f,
31
+ wrap: p,
32
32
  split: u,
33
33
  ...R
34
- } = C, i = n("space"), $ = L || (m === "horizontal" ? "center" : ""), z = E(
34
+ } = C, i = n("space"), y = L || (m === "horizontal" ? "center" : ""), z = E(
35
35
  i,
36
36
  {
37
37
  [`${i}-${m}`]: m,
38
- [`${i}-align-${$}`]: $,
39
- [`${i}-wrap`]: f,
40
- [`${i}-rtl`]: y
38
+ [`${i}-align-${y}`]: y,
39
+ [`${i}-wrap`]: p,
40
+ [`${i}-rtl`]: $
41
41
  },
42
42
  x
43
43
  );
44
44
  function g(r) {
45
- if (b(r))
45
+ if (k(r))
46
46
  return r;
47
47
  switch (r) {
48
48
  case "mini":
@@ -57,21 +57,21 @@ function V(c, e) {
57
57
  return 8;
58
58
  }
59
59
  }
60
- const h = N(B);
60
+ const h = S(B);
61
61
  function A(r) {
62
- const o = h.length === r + 1, a = y ? "marginLeft" : "marginRight";
62
+ const o = h.length === r + 1, a = $ ? "marginLeft" : "marginRight";
63
63
  if (typeof s == "string" || typeof s == "number") {
64
64
  const t = g(s);
65
- return f ? o ? { marginBottom: t } : {
65
+ return p ? o ? { marginBottom: t } : {
66
66
  [`${a}`]: t,
67
67
  marginBottom: t
68
68
  } : o ? {} : {
69
69
  [m === "vertical" ? "marginBottom" : a]: t
70
70
  };
71
71
  }
72
- if (P(s)) {
72
+ if (j(s)) {
73
73
  const t = g(s[0]), d = g(s[1]);
74
- return f ? o ? { marginBottom: d } : {
74
+ return p ? o ? { marginBottom: d } : {
75
75
  [`${a}`]: t,
76
76
  marginBottom: d
77
77
  } : m === "vertical" ? { marginBottom: d } : { [`${a}`]: t };
@@ -79,18 +79,18 @@ function V(c, e) {
79
79
  }
80
80
  return /* @__PURE__ */ l("div", { ref: e, className: z, style: w, ...R, children: h.map((r, o) => {
81
81
  const a = (r == null ? void 0 : r.key) || o, t = u != null && o > 0;
82
- return /* @__PURE__ */ M(v.Fragment, { children: [
82
+ return /* @__PURE__ */ b(N.Fragment, { children: [
83
83
  t && /* @__PURE__ */ l("div", { className: `${i}-item-split`, children: u }),
84
84
  /* @__PURE__ */ l("div", { className: `${i}-item`, style: A(o), children: r })
85
85
  ] }, a);
86
86
  }) });
87
87
  }
88
- const S = j(V);
89
- S.displayName = "Space";
88
+ const v = F(V);
89
+ v.displayName = "Space";
90
90
  function W(c, e) {
91
- return /* @__PURE__ */ l(S, { ref: e, direction: "vertical", children: c.children });
91
+ return /* @__PURE__ */ l(v, { ref: e, direction: "vertical", children: c.children });
92
92
  }
93
93
  export {
94
94
  W as SpaceVertical,
95
- S as default
95
+ v as default
96
96
  };
@@ -1,59 +1,66 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import "./chunk/l0sNRNKZ.js";
3
- import S from "@unicom-cloud/icons/IconUiMute";
4
- import d from "@unicom-cloud/icons/IconUiPauseCircleFill";
5
- import k from "@unicom-cloud/icons/IconUiPlayCircleFill";
6
- import p from "@unicom-cloud/icons/IconUiSound";
7
- import { useState as w, useEffect as y } from "react";
8
- import C from "./Button.js";
9
- function j(t) {
10
- const { useButton: m = !0 } = t ?? {}, [r, c] = w(!1);
11
- function u() {
12
- var n, e;
13
- (e = (n = window.speechSynthesis) == null ? void 0 : n.cancel) == null || e.call(n);
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import y from "@unicom-cloud/icons/IconUiMute";
3
+ import k from "@unicom-cloud/icons/IconUiPauseCircleFill";
4
+ import x from "@unicom-cloud/icons/IconUiPlayCircleFill";
5
+ import b from "@unicom-cloud/icons/IconUiSound";
6
+ import { memo as v, forwardRef as C, useState as P, useEffect as m, useImperativeHandle as z } from "react";
7
+ import B from "./Button.js";
8
+ function I(a) {
9
+ function u(t, h) {
10
+ const { useButton: S = !0 } = t ?? {}, [s, i] = P(!1);
11
+ function d() {
12
+ var n, e;
13
+ (e = (n = window.speechSynthesis) == null ? void 0 : n.cancel) == null || e.call(n);
14
+ }
15
+ function w() {
16
+ var n, e, r;
17
+ let f = ((n = t.getText) == null ? void 0 : n.call(t)) || t.text, o = new SpeechSynthesisUtterance(f);
18
+ o.onstart = function() {
19
+ i(!0);
20
+ }, o.onerror = () => {
21
+ i(!1);
22
+ }, o.onmark = () => {
23
+ }, o.onpause = () => {
24
+ i(!1);
25
+ }, o.onresume = () => {
26
+ i(!0);
27
+ }, o.onboundary = () => {
28
+ }, o.onend = () => {
29
+ i(!1);
30
+ }, (r = (e = window.speechSynthesis) == null ? void 0 : e.speak) == null || r.call(e, o);
31
+ }
32
+ function p(n) {
33
+ var e, r;
34
+ d(), s || w(), (r = (e = t.buttonProps) == null ? void 0 : e.onClick) == null || r.call(e, n);
35
+ }
36
+ let c;
37
+ if (window.speechSynthesis && window.SpeechSynthesisUtterance)
38
+ if (S) {
39
+ let { label: n, text: e, children: r, ...f } = t.buttonProps ?? {};
40
+ c = /* @__PURE__ */ l(
41
+ a,
42
+ {
43
+ ...t,
44
+ type: "text",
45
+ size: "mini",
46
+ icon: s ? /* @__PURE__ */ l(y, {}) : /* @__PURE__ */ l(b, {}),
47
+ ...f,
48
+ onClick: p,
49
+ children: n || e || r
50
+ }
51
+ );
52
+ } else
53
+ c = /* @__PURE__ */ l(s ? k : x, { ...t.iconProps, onClick: p });
54
+ return m(() => () => {
55
+ d();
56
+ }, []), z(h, () => ({})), c;
14
57
  }
15
- function h() {
16
- var o, i, f;
17
- let n = ((o = t.getText) == null ? void 0 : o.call(t)) || t.text, e = new SpeechSynthesisUtterance(n);
18
- e.onstart = function() {
19
- c(!0);
20
- }, e.onerror = () => {
21
- c(!1);
22
- }, e.onmark = () => {
23
- }, e.onpause = () => {
24
- c(!1);
25
- }, e.onresume = () => {
26
- c(!0);
27
- }, e.onboundary = () => {
28
- }, e.onend = () => {
29
- c(!1);
30
- }, (f = (i = window.speechSynthesis) == null ? void 0 : i.speak) == null || f.call(i, e);
31
- }
32
- function a(n) {
33
- var e, o;
34
- u(), r || h(), (o = (e = t.buttonProps) == null ? void 0 : e.onClick) == null || o.call(e, n);
35
- }
36
- let l;
37
- if (window.speechSynthesis && window.SpeechSynthesisUtterance)
38
- if (m) {
39
- let { label: n, text: e, children: o, ...i } = t.buttonProps ?? {};
40
- l = /* @__PURE__ */ s(
41
- C,
42
- {
43
- type: "text",
44
- size: "mini",
45
- icon: r ? /* @__PURE__ */ s(S, {}) : /* @__PURE__ */ s(p, {}),
46
- ...i,
47
- onClick: a,
48
- children: n || e || o
49
- }
50
- );
51
- } else
52
- l = /* @__PURE__ */ s(r ? d : k, { ...t.iconProps, onClick: a });
53
- return y(() => () => {
54
- u();
55
- }, []), l;
58
+ return v(C(u));
56
59
  }
60
+ const q = I(function(u) {
61
+ return m(() => () => {
62
+ }, []), /* @__PURE__ */ l(B, { ...u, children: u.children });
63
+ });
57
64
  export {
58
- j as default
65
+ q as default
59
66
  };
package/Spin.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { jsx as i, jsxs as u, Fragment as x } from "react/jsx-runtime";
2
- import E from "@unicom-cloud/icons/IconUiLoading";
3
- import P from "lodash/debounce";
4
- import C, { useContext as b, useState as j, useCallback as _, useRef as A, useImperativeHandle as D, useEffect as F } from "react";
5
- import { d as L } from "./chunk/DlLL5JQo.js";
6
- import { useMergeProps as H } from "./hooks/useMergeProps.js";
7
- import { y as v } from "./chunk/BAWsPQBM.js";
8
- import { isEmptyReactNode as M } from "./utils/is.js";
9
- import U from "lodash/isNumber";
10
- function q(n) {
11
- const { getPrefixCls: m } = b(L), a = `${m("spin")}-dot`, s = {
2
+ import j from "@unicom-cloud/icons/IconUiLoading";
3
+ import E from "lodash/debounce";
4
+ import C, { useContext as b, useState as P, useCallback as _, useRef as A, useImperativeHandle as D, useEffect as F } from "react";
5
+ import { a as w } from "./chunk/BJQ5UNa-.js";
6
+ import { c as H } from "./chunk/B5gK1Idp.js";
7
+ import { m as v } from "./chunk/JPPo5nY_.js";
8
+ import { w as U } from "./chunk/CkNSv2U7.js";
9
+ import q from "lodash/isNumber";
10
+ function B(n) {
11
+ const { getPrefixCls: m } = b(w), a = `${m("spin")}-dot`, s = {
12
12
  width: n.size,
13
13
  height: n.size
14
14
  }, t = n.size ? parseInt(String(n.size)) : 0;
@@ -18,27 +18,27 @@ function q(n) {
18
18
  className: `${a}-list`,
19
19
  style: {
20
20
  height: n.size,
21
- width: U(t) && t > 0 ? t * 7 : ""
21
+ width: q(t) && t > 0 ? t * 7 : ""
22
22
  },
23
23
  children: [...new Array(5)].map((g, f) => /* @__PURE__ */ i("div", { className: a, style: s }, f))
24
24
  }
25
25
  );
26
26
  }
27
- function B(n, m) {
28
- const { getPrefixCls: a, componentConfig: s } = b(L), t = H(n, {}, s == null ? void 0 : s.Spin), {
27
+ function G(n, m) {
28
+ const { getPrefixCls: a, componentConfig: s } = b(w), t = H(n, {}, s == null ? void 0 : s.Spin), {
29
29
  style: g,
30
30
  className: f,
31
31
  children: p,
32
32
  loading: r,
33
33
  size: c,
34
34
  icon: h,
35
- element: w,
35
+ element: L,
36
36
  tip: o,
37
- dot: R,
37
+ dot: I,
38
38
  delay: l,
39
- block: I = !1,
39
+ block: R = !1,
40
40
  ...k
41
- } = t, [N, y] = j(l ? !1 : r), d = _(P(y, l), [l]), $ = l ? N : r, e = a("spin"), S = A(null);
41
+ } = t, [N, y] = P(l ? !1 : r), d = _(E(y, l), [l]), $ = l ? N : r, e = a("spin"), S = A(null);
42
42
  D(m, () => ({
43
43
  // 潘启宝添加于 2023年10月23日 星期一 10时52分55秒 CST
44
44
  dom: S.current,
@@ -53,7 +53,7 @@ function B(n, m) {
53
53
  style: {
54
54
  fontSize: c
55
55
  }
56
- }) : w || (R ? /* @__PURE__ */ i(q, { size: c }) : /* @__PURE__ */ i(E, { style: { fontSize: c } })) });
56
+ }) : L || (I ? /* @__PURE__ */ i(B, { size: c }) : /* @__PURE__ */ i(j, { style: { fontSize: c } })) });
57
57
  return /* @__PURE__ */ i(
58
58
  "div",
59
59
  {
@@ -61,7 +61,7 @@ function B(n, m) {
61
61
  className: v(
62
62
  e,
63
63
  {
64
- [`${e}-block`]: I,
64
+ [`${e}-block`]: R,
65
65
  [`${e}-loading`]: $,
66
66
  [`${e}-with-tip`]: o && !p
67
67
  },
@@ -69,7 +69,7 @@ function B(n, m) {
69
69
  ),
70
70
  style: g,
71
71
  ...k,
72
- children: M(p) ? /* @__PURE__ */ u(x, { children: [
72
+ children: U(p) ? /* @__PURE__ */ u(x, { children: [
73
73
  z,
74
74
  o ? /* @__PURE__ */ i("div", { className: `${e}-tip`, children: o }) : null
75
75
  ] }) : /* @__PURE__ */ u(x, { children: [
@@ -89,8 +89,8 @@ function B(n, m) {
89
89
  }
90
90
  );
91
91
  }
92
- const G = C.forwardRef(B);
93
- G.displayName = "Spin";
92
+ const J = C.forwardRef(G);
93
+ J.displayName = "Spin";
94
94
  export {
95
- G as default
95
+ J as default
96
96
  };
package/Statistic.js CHANGED
@@ -1,15 +1,15 @@
1
- import { jsxs as w, jsx as s, Fragment as Z } from "react/jsx-runtime";
2
- import { C as ee, P as te } from "./chunk/4-gvEY5y.js";
1
+ import { jsxs as S, jsx as s, Fragment as Z } from "react/jsx-runtime";
2
+ import { C as ee, P as te } from "./chunk/CANgSlh3.js";
3
3
  import L from "dayjs";
4
4
  import W from "lodash/isFunction";
5
5
  import M from "lodash/isNumber";
6
- import { forwardRef as Y, useContext as q, useState as H, useRef as _, useEffect as z, useImperativeHandle as ne, useMemo as re } from "react";
7
- import { d as A } from "./chunk/DlLL5JQo.js";
8
- import { useMergeProps as oe } from "./hooks/useMergeProps.js";
9
- import ie from "./Skeleton.js";
10
- import { y as B } from "./chunk/BAWsPQBM.js";
11
- import ae from "./utils/omit.js";
12
- import { getDayjsValue as E, getNow as T } from "./utils/dayjs.js";
6
+ import { forwardRef as X, useContext as Y, useState as _, useRef as j, useEffect as q, useImperativeHandle as ne, useMemo as re } from "react";
7
+ import { a as z } from "./chunk/BJQ5UNa-.js";
8
+ import { c as ae } from "./chunk/B5gK1Idp.js";
9
+ import oe from "./Skeleton.js";
10
+ import { m as A } from "./chunk/JPPo5nY_.js";
11
+ import { c as ie } from "./chunk/BdUcgWdu.js";
12
+ import { V as E, X as T } from "./chunk/BndfNLK4.js";
13
13
  import { padStart as se } from "./utils/pad.js";
14
14
  const le = [
15
15
  ["Y", 1e3 * 60 * 60 * 24 * 365],
@@ -27,168 +27,168 @@ const le = [
27
27
  ["S", 1]
28
28
  // million seconds
29
29
  ];
30
- function k(u, S) {
31
- let p = u;
30
+ function k(u, w) {
31
+ let v = u;
32
32
  return le.reduce((m, [l, d]) => {
33
33
  if (m.indexOf(l) !== -1) {
34
- const e = Math.floor(p / d);
35
- return p -= e * d, m.replace(new RegExp(`${l}+`, "g"), (g) => {
36
- const f = g.length;
34
+ const e = Math.floor(v / d);
35
+ return v -= e * d, m.replace(new RegExp(`${l}+`, "g"), ($) => {
36
+ const f = $.length;
37
37
  return se(e.toString(), f, "0");
38
38
  });
39
39
  }
40
40
  return m;
41
- }, S);
41
+ }, w);
42
42
  }
43
- function ce(u, S) {
44
- const { getPrefixCls: p } = q(A), {
43
+ function ce(u, w) {
44
+ const { getPrefixCls: v } = Y(z), {
45
45
  className: m,
46
46
  style: l,
47
47
  title: d,
48
48
  styleValue: e,
49
- value: g,
49
+ value: $,
50
50
  onFinish: f,
51
- renderFormat: $,
52
- format: v = "HH:mm:ss",
51
+ renderFormat: g,
52
+ format: p = "HH:mm:ss",
53
53
  start: y = !0
54
- } = u, r = E(g, v) || L(), C = E(u.now, v), o = p("statistic"), [N, D] = H(
54
+ } = u, r = E($, p) || L(), C = E(u.now, p), a = v("statistic"), [N, D] = _(
55
55
  r.diff(C, "millisecond")
56
- ), [F, R] = H(
57
- k(Math.max(N, 0), v)
58
- ), h = _(null), V = () => {
56
+ ), [F, R] = _(
57
+ k(Math.max(N, 0), p)
58
+ ), h = j(null), V = () => {
59
59
  clearInterval(h.current), h.current = null;
60
- }, i = () => {
60
+ }, o = () => {
61
61
  h.current = setInterval(() => {
62
62
  const t = r.diff(T()), x = r.diff(T(), "millisecond");
63
63
  x <= 0 && (V(), f == null || f());
64
- const n = k(Math.max(x, 0), v);
64
+ const n = k(Math.max(x, 0), p);
65
65
  R(n), D(t);
66
66
  }, 1e3 / 30);
67
67
  };
68
- z(() => (!h.current && y && r.valueOf() >= Date.now() && i(), () => {
68
+ q(() => (!h.current && y && r.valueOf() >= Date.now() && o(), () => {
69
69
  V();
70
70
  }), [u.start]);
71
- const b = W($) ? $(N, F) : F;
72
- return /* @__PURE__ */ w(
71
+ const b = W(g) ? g(N, F) : F;
72
+ return /* @__PURE__ */ S(
73
73
  "div",
74
74
  {
75
- ref: S,
76
- className: B(`${o}`, `${o}-countdown`, m),
75
+ ref: w,
76
+ className: A(`${a}`, `${a}-countdown`, m),
77
77
  style: l,
78
78
  children: [
79
- d && /* @__PURE__ */ s("div", { className: `${o}-title`, children: d }),
80
- /* @__PURE__ */ s("div", { className: `${o}-content`, children: /* @__PURE__ */ s("div", { className: `${o}-value`, style: e, children: b }) })
79
+ d && /* @__PURE__ */ s("div", { className: `${a}-title`, children: d }),
80
+ /* @__PURE__ */ s("div", { className: `${a}-content`, children: /* @__PURE__ */ s("div", { className: `${a}-value`, style: e, children: b }) })
81
81
  ]
82
82
  }
83
83
  );
84
84
  }
85
- const G = Y(ce);
86
- G.displayName = "StatisticCountdown";
87
- function ue(u, S) {
88
- const p = {
85
+ const B = X(ce);
86
+ B.displayName = "StatisticCountdown";
87
+ function ue(u, w) {
88
+ const v = {
89
89
  countFrom: 0,
90
90
  countDuration: 2e3
91
- }, { getPrefixCls: m, componentConfig: l, rtl: d } = q(A), e = oe(
91
+ }, { getPrefixCls: m, componentConfig: l, rtl: d } = Y(z), e = ae(
92
92
  u,
93
- p,
93
+ v,
94
94
  l == null ? void 0 : l.Statistic
95
95
  ), {
96
- className: g,
96
+ className: $,
97
97
  style: f,
98
- title: $,
99
- extra: v,
98
+ title: g,
99
+ extra: p,
100
100
  groupSeparator: y,
101
101
  precision: r,
102
102
  prefix: C,
103
- suffix: o,
103
+ suffix: a,
104
104
  format: N,
105
105
  renderFormat: D,
106
106
  styleValue: F,
107
107
  styleDecimal: R,
108
108
  loading: h,
109
109
  ...V
110
- } = e, i = _(), b = _(), [t, x] = H(
110
+ } = e, o = j(), b = j(), [t, x] = _(
111
111
  "value" in e ? e.value : void 0
112
- ), n = m("statistic"), P = (c = e.countFrom, a = e.value) => {
113
- const { countDuration: U } = e;
114
- c !== a && (i.current = new ee({
112
+ ), n = m("statistic"), P = (c = e.countFrom, i = e.value) => {
113
+ const { countDuration: H } = e;
114
+ c !== i && (o.current = new ee({
115
115
  from: {
116
116
  value: c
117
117
  },
118
118
  to: {
119
- value: a
119
+ value: i
120
120
  },
121
- duration: U,
121
+ duration: H,
122
122
  easing: te,
123
- onUpdate: (X) => {
124
- x(X.value.toFixed(r));
123
+ onUpdate: (Q) => {
124
+ x(Q.value.toFixed(r));
125
125
  },
126
126
  onFinish: () => {
127
- x(a);
127
+ x(i);
128
128
  }
129
- }), i.current.start());
129
+ }), o.current.start());
130
130
  };
131
- z(() => (e.countUp ? (i.current && i.current.stop(), t !== e.value ? P(Number(t), e.value) : P()) : x(e.value), () => {
132
- i.current && i.current.stop(), i.current = null;
133
- }), [e.value]), ne(S, () => ({
131
+ q(() => (e.countUp ? (o.current && o.current.stop(), t !== e.value ? P(Number(t), e.value) : P()) : x(e.value), () => {
132
+ o.current && o.current.stop(), o.current = null;
133
+ }), [e.value]), ne(w, () => ({
134
134
  countUp: P,
135
135
  getRootDOMNode: () => b.current
136
136
  }));
137
- const { int: K, decimal: j } = re(() => {
137
+ const { int: J, decimal: U } = re(() => {
138
138
  let c = t;
139
139
  N && (c = L(t).format(N)), M(r) && r >= 0 && (c = Number(t).toFixed(r));
140
- let a = String(c).split(".")[0];
141
- const U = String(c).split(".")[1];
142
- return y && M(Number(t)) && (a = Number(a).toLocaleString("en-US")), {
143
- int: a,
144
- decimal: U
140
+ let i = String(c).split(".")[0];
141
+ const H = String(c).split(".")[1];
142
+ return y && M(Number(t)) && (i = Number(i).toLocaleString("en-US")), {
143
+ int: i,
144
+ decimal: H
145
145
  };
146
- }, [N, y, r, t]), Q = W(D) ? D : (c, a) => a, I = M(Number(t)), O = /* @__PURE__ */ w(Z, { children: [
146
+ }, [N, y, r, t]), K = W(D) ? D : (c, i) => i, I = M(Number(t)), O = /* @__PURE__ */ S(Z, { children: [
147
147
  C != null ? /* @__PURE__ */ s("span", { className: `${n}-value-prefix`, children: C }) : null,
148
- Q(t, I ? K : t)
148
+ K(t, I ? J : t)
149
149
  ] });
150
- return /* @__PURE__ */ w(
150
+ return /* @__PURE__ */ S(
151
151
  "div",
152
152
  {
153
- className: B(`${n}`, { [`${n}-rtl`]: d }, g),
153
+ className: A(`${n}`, { [`${n}-rtl`]: d }, $),
154
154
  style: f,
155
- ...ae(V, ["value", "countUp", "countFrom", "countDuration"]),
155
+ ...ie(V, ["value", "countUp", "countFrom", "countDuration"]),
156
156
  ref: b,
157
157
  children: [
158
- $ && /* @__PURE__ */ s("div", { className: `${n}-title`, children: $ }),
159
- /* @__PURE__ */ w("div", { className: `${n}-content`, children: [
158
+ g && /* @__PURE__ */ s("div", { className: `${n}-title`, children: g }),
159
+ /* @__PURE__ */ S("div", { className: `${n}-content`, children: [
160
160
  /* @__PURE__ */ s(
161
- ie,
161
+ oe,
162
162
  {
163
163
  animation: !0,
164
164
  loading: !!h,
165
165
  text: { rows: 1, width: "100%" },
166
- children: /* @__PURE__ */ w("div", { className: `${n}-value`, style: F, children: [
166
+ children: /* @__PURE__ */ S("div", { className: `${n}-value`, style: F, children: [
167
167
  I ? /* @__PURE__ */ s("span", { className: `${n}-value-int`, children: O }) : O,
168
- j !== void 0 || o ? /* @__PURE__ */ w(
168
+ U !== void 0 || a ? /* @__PURE__ */ S(
169
169
  "span",
170
170
  {
171
171
  className: `${n}-value-decimal`,
172
172
  style: R,
173
173
  children: [
174
- M(Number(t)) && j !== void 0 && `.${j}`,
175
- o != null ? /* @__PURE__ */ s("span", { className: `${n}-value-suffix`, children: o }) : null
174
+ M(Number(t)) && U !== void 0 && `.${U}`,
175
+ a != null ? /* @__PURE__ */ s("span", { className: `${n}-value-suffix`, children: a }) : null
176
176
  ]
177
177
  }
178
178
  ) : null
179
179
  ] })
180
180
  }
181
181
  ),
182
- v && /* @__PURE__ */ s("div", { className: `${n}-extra`, children: v })
182
+ p && /* @__PURE__ */ s("div", { className: `${n}-extra`, children: p })
183
183
  ] })
184
184
  ]
185
185
  }
186
186
  );
187
187
  }
188
- const me = Y(ue), J = me;
189
- J.displayName = "Statistic";
190
- J.Countdown = G;
188
+ const me = X(ue), G = me;
189
+ G.displayName = "Statistic";
190
+ G.Countdown = B;
191
191
  export {
192
- G as StatisticCountdown,
193
- J as default
192
+ B as StatisticCountdown,
193
+ G as default
194
194
  };