@unicom-cloud/ui 0.8.54 → 0.8.56

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 (429) hide show
  1. package/Affix.js +36 -36
  2. package/Alert.js +41 -45
  3. package/Anchor.js +1 -1
  4. package/AutoComplete.js +40 -40
  5. package/Avatar.js +36 -36
  6. package/BackTop.js +26 -26
  7. package/Badge.js +43 -43
  8. package/Breadcrumb.js +17 -17
  9. package/Button.js +42 -42
  10. package/Calendar.js +54 -56
  11. package/Card.js +28 -28
  12. package/Carousel.js +42 -43
  13. package/Cascader.js +1 -1
  14. package/Checkbox.js +1 -1
  15. package/Collapse.js +1 -1
  16. package/ColorPicker.js +11 -580
  17. package/Comment.js +14 -14
  18. package/ConfigProvider.js +2 -2
  19. package/Copy.js +26 -26
  20. package/DatePicker.js +661 -670
  21. package/Descriptions.js +53 -53
  22. package/Divider.js +15 -15
  23. package/Draggable.js +16 -16
  24. package/Drawer.js +1 -1
  25. package/Dropdown.js +10 -10
  26. package/Empty.js +3 -3
  27. package/Form.js +10 -1410
  28. package/Grid.js +49 -49
  29. package/Icon.js +10 -10
  30. package/IconHover.js +2 -2
  31. package/Image.js +1 -1
  32. package/Input.js +1 -1
  33. package/InputNumber.js +7 -7
  34. package/InputTag.js +1 -1
  35. package/Layout.js +34 -34
  36. package/Link.js +26 -26
  37. package/List.js +39 -39
  38. package/Mentions.js +17 -17
  39. package/Menu.js +1 -1
  40. package/Message.js +3 -3
  41. package/Modal.js +1 -1
  42. package/Notice.js +4 -10
  43. package/Notification.js +3 -3
  44. package/OverflowEllipsis.js +18 -18
  45. package/PageHeader.js +26 -27
  46. package/Pagination.js +1 -1
  47. package/Picker.js +1 -1
  48. package/Popconfirm.js +15 -15
  49. package/Popover.js +22 -22
  50. package/Progress.js +18 -18
  51. package/Radio.js +2 -2
  52. package/Rate.js +40 -43
  53. package/ResizeBox.js +191 -192
  54. package/Result.js +17 -17
  55. package/Select.js +1 -1
  56. package/SelectView.js +56 -56
  57. package/Skeleton.js +35 -35
  58. package/Slider.js +81 -81
  59. package/Space.js +27 -27
  60. package/SpeechSynthesis.js +29 -32
  61. package/Spin.js +15 -15
  62. package/Statistic.js +54 -54
  63. package/Steps.js +44 -44
  64. package/Switch.js +39 -38
  65. package/Table.js +488 -488
  66. package/Tabs.js +1 -1
  67. package/Tag.js +13 -14
  68. package/TimePicker.js +68 -68
  69. package/Timeline.js +1 -1
  70. package/Tooltip.js +27 -28
  71. package/Transfer.js +29 -30
  72. package/Tree.js +1 -1
  73. package/TreeSelect.js +1 -1
  74. package/Trigger.js +53 -52
  75. package/Typography.js +2 -737
  76. package/Upload.js +1 -1
  77. package/VerificationCode.js +1 -1
  78. package/Version.js +1 -1
  79. package/Watermark.js +1 -1
  80. package/chunk/1mEO29GP.js +23 -0
  81. package/chunk/5pZ3ayqs.js +29 -0
  82. package/chunk/9Gh1afjL.js +23 -0
  83. package/chunk/B1S1OEw6.js +29 -0
  84. package/chunk/{RRWbBHK-.js → B2Bp3i5u.js} +221 -221
  85. package/chunk/B45v5S9k.js +209 -0
  86. package/chunk/B6fn5y_s.js +23 -0
  87. package/chunk/B9PsJar0.js +118 -0
  88. package/chunk/BA02BFUV.js +41 -0
  89. package/chunk/BCk8e9fj.js +29 -0
  90. package/chunk/BHK9zpXn.js +207 -0
  91. package/chunk/BHLTzWzi.js +29 -0
  92. package/chunk/BK1FKNAX.js +41 -0
  93. package/chunk/BM6dpkeM.js +32 -0
  94. package/chunk/{DQ3uFRJD.js → BP7xX86Q.js} +223 -202
  95. package/chunk/BWx1cVT_.js +66 -0
  96. package/chunk/BbI3gqVr.js +23 -0
  97. package/chunk/{CIc4yo9k.js → BbYzi8M0.js} +46 -46
  98. package/chunk/Be7oeWU8.js +34 -0
  99. package/chunk/BeM2hfks.js +88 -0
  100. package/chunk/BkHxm4sv.js +41 -0
  101. package/chunk/{BUQBof6z.js → Bl-ODC57.js} +206 -207
  102. package/chunk/BlKc_pDZ.js +678 -0
  103. package/chunk/{BzqZZHGK.js → Bny52uiG.js} +48 -48
  104. package/chunk/{PuuHmqnW.js → BpwDupra.js} +238 -238
  105. package/chunk/BqxwlITu.js +52 -0
  106. package/chunk/BuEC_zcc.js +278 -0
  107. package/chunk/{CqcZfQQ4.js → Bv8ZRDFt.js} +80 -80
  108. package/chunk/{DZGcv_9A.js → C-w9pFY-.js} +32 -32
  109. package/chunk/C2fspJbE.js +23 -0
  110. package/chunk/C7Okdv4u.js +34 -0
  111. package/chunk/C95ipQ6b.js +41 -0
  112. package/chunk/{BzMYgxgO.js → CF3Telny.js} +26 -26
  113. package/chunk/CPl52AZh.js +206 -0
  114. package/chunk/CXNW5Y2a.js +23 -0
  115. package/chunk/Cb_oWoGj.js +40 -0
  116. package/chunk/CcX2pBUh.js +46 -0
  117. package/chunk/{BdJcAQ0Q.js → CggcswbO.js} +18 -18
  118. package/chunk/CilQ012k.js +1796 -0
  119. package/chunk/CkAOsst1.js +73 -0
  120. package/chunk/CnY8SvgY.js +126 -0
  121. package/chunk/{CTSIr-Pr.js → CwXmtKib.js} +89 -101
  122. package/chunk/{C3I_L73_.js → CwjaGytU.js} +39 -40
  123. package/chunk/{DTgc2wl4.js → D6RTBH4C.js} +36 -36
  124. package/chunk/D6mVoX-C.js +116 -0
  125. package/chunk/D9TqtOhq.js +40 -0
  126. package/chunk/{qSJXQ1qu.js → DBJ8d0o0.js} +183 -189
  127. package/chunk/{RL1SNlng.js → DDda6s72.js} +16 -16
  128. package/chunk/{BH5fVprw.js → DJmWXheU.js} +9 -9
  129. package/chunk/DPvnQJ-H.js +52 -0
  130. package/chunk/DQXq1QT0.js +58 -0
  131. package/chunk/DRJO1GfY.js +855 -0
  132. package/chunk/DUxWiN2U.js +1465 -0
  133. package/chunk/DYZzQ2uT.js +29 -0
  134. package/chunk/{CK0H_Yi4.js → DafaH1Qt.js} +140 -138
  135. package/chunk/{ShWkfsJd.js → DalIRWr7.js} +21 -21
  136. package/chunk/{CzTYWtfa.js → Dg2DmtzA.js} +31 -30
  137. package/chunk/DhLbnw3R.js +29 -0
  138. package/chunk/{BmtF7P8U.js → DkIjpuBZ.js} +170 -170
  139. package/chunk/Do1aMgY3.js +12 -0
  140. package/chunk/Dtnux4qL.js +38 -0
  141. package/chunk/{Niaq_og8.js → Dw4SJ4o1.js} +219 -225
  142. package/chunk/{DbtCtriE.js → DxNRWF67.js} +30 -31
  143. package/chunk/JnyGFb5j.js +284 -0
  144. package/chunk/Lk60-jkf.js +1098 -0
  145. package/chunk/V_IcWDFx.js +49 -0
  146. package/chunk/{DG7VgAhL.js → WkB0MERB.js} +107 -108
  147. package/chunk/bsawGxt8.js +32 -0
  148. package/chunk/cUuQh7L_.js +46 -0
  149. package/chunk/fqgc8r6C.js +29 -0
  150. package/chunk/m_kOQCiU.js +29 -0
  151. package/chunk/sl8s35SK.js +29 -0
  152. package/chunk/{Dki1RB5p.js → t51ig1FZ.js} +154 -155
  153. package/chunk/{BC0PujUD.js → yvbAFxtk.js} +119 -121
  154. package/hooks/index.js +52 -246
  155. package/hooks/useForceUpdate.js +6 -6
  156. package/hooks/useIntersectionObserver.js +12 -10
  157. package/hooks/useKeyboardEvent.js +7 -7
  158. package/hooks/useMedia.js +9 -12
  159. package/hooks/useMergeValue.js +10 -8
  160. package/hooks/useResizeObserver.js +16 -0
  161. package/hooks/useUpdateEffect.js +7 -9
  162. package/hooks/useWindowSize.js +16 -20
  163. package/icons.js +6003 -0
  164. package/index.js +377 -472
  165. package/locale/en-US.js +20 -6
  166. package/locale/ja-JP.js +4 -2
  167. package/locale/ko-KR.js +2 -2
  168. package/locale/pt-BR.js +3 -3
  169. package/locale/pt-PT.js +3 -3
  170. package/locale/tr-TR.js +11 -3
  171. package/locale/zh-CN.js +6 -0
  172. package/locale/zh-HK.js +2 -0
  173. package/locale/zh-TW.js +2 -0
  174. package/package.json +1 -1
  175. package/style.css +1 -1
  176. package/types/anchor/util.d.ts +1 -0
  177. package/types/button/index.d.ts +2 -2
  178. package/types/color-picker/colors.d.ts +1 -1
  179. package/types/date-picker/util.d.ts +1 -1
  180. package/types/hooks/index.d.ts +3 -101
  181. package/types/hooks/useForceUpdate.d.ts +1 -2
  182. package/types/hooks/useIntersectionObserver.d.ts +1 -1
  183. package/types/hooks/useKeyboardEvent.d.ts +2 -2
  184. package/types/hooks/useMergeProps.d.ts +1 -1
  185. package/types/hooks/useResizeObserver.d.ts +5 -0
  186. package/types/hooks/useUpdateEffect.d.ts +2 -3
  187. package/types/hooks/useWindowSize.d.ts +1 -1
  188. package/types/icons.d.ts +4 -0
  189. package/types/index.d.ts +12 -2
  190. package/types/locale/en-US.d.ts +4 -0
  191. package/types/locale/interface.d.ts +2 -0
  192. package/types/locale/ja-JP.d.ts +4 -0
  193. package/types/locale/zh-CN.d.ts +4 -0
  194. package/types/locale/zh-HK.d.ts +4 -0
  195. package/types/locale/zh-TW.d.ts +4 -0
  196. package/types/modal/config.d.ts +1 -1
  197. package/types/version/index.d.ts +1 -1
  198. package/utils/CSSTransition.js +1 -1
  199. package/utils/className.js +2 -3
  200. package/utils/contextHolder.js +2 -2
  201. package/utils/copy.js +2 -3
  202. package/utils/is.js +127 -90
  203. package/utils/reactDOM.js +17 -15
  204. package/utils/responsiveObserve.js +16 -16
  205. package/utils/saveAs.js +2 -3
  206. package/utils/scrollIntoView.js +1 -1
  207. package/chunk/BdYAMaw9.js +0 -6
  208. package/chunk/CiZVOdJ3.js +0 -122
  209. package/chunk/DdtfPvgk.js +0 -272
  210. package/chunk/I4RV9SKZ.js +0 -135
  211. package/chunk/TXCrI0jN.js +0 -20
  212. package/chunk/i1A7W8Qt.js +0 -277
  213. package/chunk/xPzFRQJn.js +0 -740
  214. package/hooks/useAsync.js +0 -13
  215. package/hooks/useAsyncFn.js +0 -15
  216. package/hooks/useAsyncRetry.js +0 -17
  217. package/hooks/useAudio.js +0 -5
  218. package/hooks/useBeforeUnload.js +0 -18
  219. package/hooks/useBoolean.js +0 -4
  220. package/hooks/useClickAway.js +0 -22
  221. package/hooks/useCopyToClipboard.js +0 -51
  222. package/hooks/useCounter.js +0 -45
  223. package/hooks/useCreation.js +0 -17
  224. package/hooks/useCustomCompareEffect.js +0 -15
  225. package/hooks/useDebounce.js +0 -9
  226. package/hooks/useDefault.js +0 -10
  227. package/hooks/useDrop.js +0 -44
  228. package/hooks/useDropArea.js +0 -45
  229. package/hooks/useEffectOnce.js +0 -7
  230. package/hooks/useEffectState.js +0 -9
  231. package/hooks/useEnsuredForwardedRef.js +0 -17
  232. package/hooks/useError.js +0 -13
  233. package/hooks/useEvent.js +0 -13
  234. package/hooks/useEventListener.js +0 -39
  235. package/hooks/useFavicon.js +0 -16
  236. package/hooks/useFirstMountState.js +0 -8
  237. package/hooks/useFullscreen.js +0 -39
  238. package/hooks/useGeolocation.js +0 -38
  239. package/hooks/useGetSet.js +0 -18
  240. package/hooks/useGetSetState.js +0 -12
  241. package/hooks/useHash.js +0 -26
  242. package/hooks/useHover.js +0 -16
  243. package/hooks/useHoverDirty.js +0 -17
  244. package/hooks/useIdle.js +0 -34
  245. package/hooks/useIntersection.js +0 -19
  246. package/hooks/useIsomorphicLayoutEffect2.js +0 -6
  247. package/hooks/useKey.js +0 -16
  248. package/hooks/useKeyPress.js +0 -13
  249. package/hooks/useKeyPressEvent.js +0 -11
  250. package/hooks/useLatest.js +0 -8
  251. package/hooks/useLifecycles.js +0 -9
  252. package/hooks/useList.js +0 -67
  253. package/hooks/useLocalStorage.js +0 -42
  254. package/hooks/useLocation.js +0 -51
  255. package/hooks/useLockBodyScroll.js +0 -55
  256. package/hooks/useLogger.js +0 -10
  257. package/hooks/useLongPress.js +0 -24
  258. package/hooks/useMap.js +0 -31
  259. package/hooks/useMeasure.js +0 -34
  260. package/hooks/useMeasureDirty.js +0 -24
  261. package/hooks/useMediaDevices.js +0 -26
  262. package/hooks/useMediatedState.js +0 -14
  263. package/hooks/useMethods.js +0 -14
  264. package/hooks/useMotion.js +0 -56
  265. package/hooks/useMount.js +0 -9
  266. package/hooks/useMountedState.js +0 -10
  267. package/hooks/useMouse.js +0 -44
  268. package/hooks/useMouseHovered.js +0 -9
  269. package/hooks/useMouseWheel.js +0 -14
  270. package/hooks/useMultiStateValidator.js +0 -19
  271. package/hooks/useNetworkState.js +0 -31
  272. package/hooks/useNumber.js +0 -4
  273. package/hooks/useObservable.js +0 -12
  274. package/hooks/useOrientation.js +0 -30
  275. package/hooks/usePageLeave.js +0 -19
  276. package/hooks/usePermission.js +0 -19
  277. package/hooks/usePinchZoom.js +0 -40
  278. package/hooks/usePreviousDistinct.js +0 -10
  279. package/hooks/usePromise.js +0 -19
  280. package/hooks/useQueue.js +0 -25
  281. package/hooks/useRaf.js +0 -24
  282. package/hooks/useRafLoop.js +0 -24
  283. package/hooks/useRafState.js +0 -15
  284. package/hooks/useReactive.js +0 -21
  285. package/hooks/useRendersCount.js +0 -7
  286. package/hooks/useScroll.js +0 -27
  287. package/hooks/useScrolling.js +0 -23
  288. package/hooks/useSearchParam.js +0 -18
  289. package/hooks/useSessionStorage.js +0 -29
  290. package/hooks/useSet.js +0 -15
  291. package/hooks/useSetState.js +0 -16
  292. package/hooks/useSize.js +0 -58
  293. package/hooks/useSlider.js +0 -48
  294. package/hooks/useSpeech.js +0 -45
  295. package/hooks/useStartTyping.js +0 -30
  296. package/hooks/useStateList.js +0 -37
  297. package/hooks/useStateValidator.js +0 -17
  298. package/hooks/useStateWithHistory.js +0 -46
  299. package/hooks/useSyncState.js +0 -14
  300. package/hooks/useThrottle.js +0 -21
  301. package/hooks/useThrottleFn.js +0 -21
  302. package/hooks/useTimeout.js +0 -17
  303. package/hooks/useTimeoutFn.js +0 -16
  304. package/hooks/useTitle.js +0 -18
  305. package/hooks/useToggle.js +0 -5
  306. package/hooks/useTween.js +0 -11
  307. package/hooks/useUnmount.js +0 -9
  308. package/hooks/useUnmountPromise.js +0 -20
  309. package/hooks/useUpdate.js +0 -10
  310. package/hooks/useUpdateTimeout.js +0 -9
  311. package/hooks/useUpsert.js +0 -16
  312. package/hooks/useVibrate.js +0 -21
  313. package/hooks/useVideo.js +0 -5
  314. package/hooks/useWindowScroll.js +0 -29
  315. package/types/hooks/component/UseKey.d.ts +0 -2
  316. package/types/hooks/factory/createBreakpoint.d.ts +0 -4
  317. package/types/hooks/factory/createGlobalState.d.ts +0 -7
  318. package/types/hooks/factory/createHTMLMediaHook.d.ts +0 -33
  319. package/types/hooks/factory/createMemo.d.ts +0 -2
  320. package/types/hooks/factory/createReducer.d.ts +0 -8
  321. package/types/hooks/factory/createReducerContext.d.ts +0 -5
  322. package/types/hooks/factory/createRenderProp.d.ts +0 -1
  323. package/types/hooks/factory/createRouter.d.ts +0 -7
  324. package/types/hooks/factory/createStateContext.d.ts +0 -5
  325. package/types/hooks/misc/hookState.d.ts +0 -8
  326. package/types/hooks/misc/parseTimeRanges.d.ts +0 -4
  327. package/types/hooks/misc/types.d.ts +0 -2
  328. package/types/hooks/misc/util.d.ts +0 -5
  329. package/types/hooks/useAsync.d.ts +0 -20
  330. package/types/hooks/useAsyncFn.d.ts +0 -23
  331. package/types/hooks/useAsyncRetry.d.ts +0 -27
  332. package/types/hooks/useAudio.d.ts +0 -11
  333. package/types/hooks/useBeforeUnload.d.ts +0 -2
  334. package/types/hooks/useBoolean.d.ts +0 -2
  335. package/types/hooks/useClickAway.d.ts +0 -3
  336. package/types/hooks/useCopyToClipboard.d.ts +0 -7
  337. package/types/hooks/useCounter.d.ts +0 -9
  338. package/types/hooks/useCreation.d.ts +0 -2
  339. package/types/hooks/useCustomCompareEffect.d.ts +0 -4
  340. package/types/hooks/useDebounce.d.ts +0 -3
  341. package/types/hooks/useDefault.d.ts +0 -2
  342. package/types/hooks/useDrop.d.ts +0 -17
  343. package/types/hooks/useDropArea.d.ts +0 -18
  344. package/types/hooks/useEffectOnce.d.ts +0 -3
  345. package/types/hooks/useEffectState.d.ts +0 -2
  346. package/types/hooks/useEnsuredForwardedRef.d.ts +0 -3
  347. package/types/hooks/useError.d.ts +0 -2
  348. package/types/hooks/useEvent.d.ts +0 -13
  349. package/types/hooks/useEventListener.d.ts +0 -2
  350. package/types/hooks/useFavicon.d.ts +0 -2
  351. package/types/hooks/useFirstMountState.d.ts +0 -1
  352. package/types/hooks/useFullscreen.d.ts +0 -10
  353. package/types/hooks/useGeolocation.d.ts +0 -21
  354. package/types/hooks/useGetSet.d.ts +0 -3
  355. package/types/hooks/useGetSetState.d.ts +0 -2
  356. package/types/hooks/useHash.d.ts +0 -2
  357. package/types/hooks/useHover.d.ts +0 -4
  358. package/types/hooks/useHoverDirty.d.ts +0 -3
  359. package/types/hooks/useIdle.d.ts +0 -2
  360. package/types/hooks/useIntersection.d.ts +0 -3
  361. package/types/hooks/useIsomorphicLayoutEffect2.d.ts +0 -3
  362. package/types/hooks/useKey.d.ts +0 -12
  363. package/types/hooks/useKeyPress.d.ts +0 -3
  364. package/types/hooks/useKeyPressEvent.d.ts +0 -3
  365. package/types/hooks/useLatest.d.ts +0 -4
  366. package/types/hooks/useLifecycles.d.ts +0 -2
  367. package/types/hooks/useList.d.ts +0 -18
  368. package/types/hooks/useLocalStorage.d.ts +0 -10
  369. package/types/hooks/useLocation.d.ts +0 -16
  370. package/types/hooks/useLockBodyScroll.d.ts +0 -8
  371. package/types/hooks/useLogger.d.ts +0 -2
  372. package/types/hooks/useLongPress.d.ts +0 -12
  373. package/types/hooks/useMap.d.ts +0 -11
  374. package/types/hooks/useMeasure.d.ts +0 -9
  375. package/types/hooks/useMeasureDirty.d.ts +0 -11
  376. package/types/hooks/useMediaDevices.d.ts +0 -2
  377. package/types/hooks/useMediatedState.d.ts +0 -9
  378. package/types/hooks/useMethods.d.ts +0 -8
  379. package/types/hooks/useMotion.d.ts +0 -20
  380. package/types/hooks/useMount.d.ts +0 -2
  381. package/types/hooks/useMountedState.d.ts +0 -1
  382. package/types/hooks/useMouse.d.ts +0 -13
  383. package/types/hooks/useMouseHovered.d.ts +0 -8
  384. package/types/hooks/useMouseWheel.d.ts +0 -2
  385. package/types/hooks/useMultiStateValidator.d.ts +0 -9
  386. package/types/hooks/useNetworkState.d.ts +0 -22
  387. package/types/hooks/useNumber.d.ts +0 -2
  388. package/types/hooks/useObservable.d.ts +0 -8
  389. package/types/hooks/useOrientation.d.ts +0 -6
  390. package/types/hooks/usePageLeave.d.ts +0 -2
  391. package/types/hooks/usePermission.d.ts +0 -16
  392. package/types/hooks/usePinchZoom.d.ts +0 -18
  393. package/types/hooks/usePreviousDistinct.d.ts +0 -2
  394. package/types/hooks/usePromise.d.ts +0 -3
  395. package/types/hooks/useQueue.d.ts +0 -9
  396. package/types/hooks/useRaf.d.ts +0 -2
  397. package/types/hooks/useRafLoop.d.ts +0 -2
  398. package/types/hooks/useRafState.d.ts +0 -3
  399. package/types/hooks/useReactive.d.ts +0 -2
  400. package/types/hooks/useRendersCount.d.ts +0 -1
  401. package/types/hooks/useScroll.d.ts +0 -7
  402. package/types/hooks/useScrolling.d.ts +0 -3
  403. package/types/hooks/useSearchParam.d.ts +0 -3
  404. package/types/hooks/useSessionStorage.d.ts +0 -2
  405. package/types/hooks/useSet.d.ts +0 -11
  406. package/types/hooks/useSetState.d.ts +0 -2
  407. package/types/hooks/useSize.d.ts +0 -8
  408. package/types/hooks/useSlider.d.ts +0 -15
  409. package/types/hooks/useSpeech.d.ts +0 -16
  410. package/types/hooks/useStartTyping.d.ts +0 -2
  411. package/types/hooks/useStateList.d.ts +0 -9
  412. package/types/hooks/useStateValidator.d.ts +0 -8
  413. package/types/hooks/useStateWithHistory.d.ts +0 -18
  414. package/types/hooks/useSyncState.d.ts +0 -3
  415. package/types/hooks/useThrottle.d.ts +0 -2
  416. package/types/hooks/useThrottleFn.d.ts +0 -2
  417. package/types/hooks/useTimeout.d.ts +0 -2
  418. package/types/hooks/useTimeoutFn.d.ts +0 -2
  419. package/types/hooks/useTitle.d.ts +0 -6
  420. package/types/hooks/useToggle.d.ts +0 -2
  421. package/types/hooks/useTween.d.ts +0 -3
  422. package/types/hooks/useUnmount.d.ts +0 -2
  423. package/types/hooks/useUnmountPromise.d.ts +0 -3
  424. package/types/hooks/useUpdate.d.ts +0 -2
  425. package/types/hooks/useUpdateTimeout.d.ts +0 -2
  426. package/types/hooks/useUpsert.d.ts +0 -6
  427. package/types/hooks/useVibrate.d.ts +0 -4
  428. package/types/hooks/useVideo.d.ts +0 -11
  429. package/types/hooks/useWindowScroll.d.ts +0 -6
@@ -1,76 +1,75 @@
1
1
  import { jsx as n, jsxs as K } from "react/jsx-runtime";
2
- import j from "@unicom-cloud/icons/IconUiLeft";
3
- import q from "@unicom-cloud/icons/IconUiRight";
2
+ import { a as j, I as q } from "./D9TqtOhq.js";
4
3
  import X from "lodash/isArray";
5
- import w from "lodash/isNumber";
4
+ import y from "lodash/isNumber";
6
5
  import { createContext as Y, forwardRef as Z, useContext as ee, useState as re, useRef as A, useEffect as F, useMemo as te } from "react";
7
- import { a as ie } from "./xPzFRQJn.js";
6
+ import { b as ie } from "./DUxWiN2U.js";
8
7
  import se from "../hooks/useMergeValue.js";
9
8
  import oe from "../ResizeBox.js";
10
- import H from "@unicom-cloud/utils/class-name";
9
+ import { y as H } from "./Do1aMgY3.js";
11
10
  import L, { responsiveMap as ne } from "../utils/responsiveObserve.js";
12
11
  const le = Y({
13
12
  siderCollapsed: !1,
14
13
  collapsedWidth: 64
15
14
  }), ae = /* @__PURE__ */ (() => {
16
15
  let i = 0;
17
- return (m = "") => (i += 1, `${m}${i}`);
16
+ return (f = "") => (i += 1, `${f}${i}`);
18
17
  })();
19
- function ce(i, m) {
18
+ function ce(i, f) {
20
19
  var T;
21
20
  const {
22
21
  children: D,
23
22
  className: E,
24
23
  style: G,
25
- theme: y = "light",
26
- trigger: f,
27
- reverseArrow: R,
24
+ theme: N = "light",
25
+ trigger: g,
26
+ reverseArrow: I,
28
27
  collapsedWidth: r = 48,
29
- width: g = 200,
28
+ width: m = 200,
30
29
  collapsible: h,
31
30
  resizeDirections: c,
32
31
  onSiderMount: v,
33
32
  onSiderUnmount: C,
34
- breakpoint: W,
33
+ breakpoint: R,
35
34
  onBreakpoint: O,
36
35
  onCollapse: d,
37
36
  resizeBoxProps: t = {}
38
- } = i, _ = ae("pqb-sider-"), { getPrefixCls: P } = ee(ie), s = P("layout-sider"), [e, I] = se(!1, {
37
+ } = i, W = ae("pqb-sider-"), { getPrefixCls: P } = ee(ie), s = P("layout-sider"), [e, _] = se(!1, {
39
38
  value: "collapsed" in i ? i.collapsed : void 0,
40
39
  defaultValue: i.defaultCollapsed
41
- }), $ = w(g) ? `${g}px` : String(g), Q = w(r) ? `${r}` : String(r), [p, k] = re(
42
- e ? Q : $
43
- ), b = A(null), M = A(null);
40
+ }), b = y(m) ? `${m}px` : String(m), Q = y(r) ? `${r}` : String(r), [p, k] = re(
41
+ e ? Q : b
42
+ ), $ = A(null), M = A(null);
44
43
  M.current = {
45
- breakpoint: W,
44
+ breakpoint: R,
46
45
  collapsed: e,
47
46
  onCollapse: d,
48
47
  onBreakpoint: O
49
- }, F(() => (v == null || v(_), h && W in ne && (b.current = L.subscribe(
48
+ }, F(() => (v == null || v(W), h && R in ne && ($.current = L.subscribe(
50
49
  (o, l) => {
51
- const { breakpoint: a, collapsed: J, onCollapse: S, onBreakpoint: N } = M.current;
50
+ const { breakpoint: a, collapsed: J, onCollapse: S, onBreakpoint: w } = M.current;
52
51
  if (!l || l === a) {
53
52
  const u = !o[a];
54
- u !== J && (I(u), S == null || S(u, "responsive")), N == null || N(u);
53
+ u !== J && (_(u), S == null || S(u, "responsive")), w == null || w(u);
55
54
  }
56
55
  }
57
56
  )), () => {
58
- C == null || C(_), b.current && L.unsubscribe(b.current);
57
+ C == null || C(W), $.current && L.unsubscribe($.current);
59
58
  }), []), F(() => {
60
- const o = w(r) ? `${r}px` : String(r);
61
- k(e ? o : $);
62
- }, [e, $, r]);
59
+ const o = y(r) ? `${r}px` : String(r);
60
+ k(e ? o : b);
61
+ }, [e, b, r]);
63
62
  const x = c && X(c) || ((T = t.directions) == null ? void 0 : T.length), U = x ? oe : "aside", z = () => {
64
- const o = f || (e ? R ? /* @__PURE__ */ n(j, {}) : /* @__PURE__ */ n(q, {}) : R ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(j, {}));
65
- return h && f !== null ? /* @__PURE__ */ n(
63
+ const o = g || (e ? I ? /* @__PURE__ */ n(j, {}) : /* @__PURE__ */ n(q, {}) : I ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(j, {}));
64
+ return h && g !== null ? /* @__PURE__ */ n(
66
65
  "div",
67
66
  {
68
67
  style: { width: p },
69
68
  className: H(`${s}-trigger`, {
70
- [`${s}-trigger-light`]: y === "light"
69
+ [`${s}-trigger-light`]: N === "light"
71
70
  }),
72
71
  onClick: () => {
73
- I(!e), d == null || d(!e, "clickTrigger");
72
+ _(!e), d == null || d(!e, "clickTrigger");
74
73
  },
75
74
  children: o
76
75
  }
@@ -95,7 +94,7 @@ function ce(i, m) {
95
94
  children: /* @__PURE__ */ K(
96
95
  U,
97
96
  {
98
- ref: m,
97
+ ref: f,
99
98
  style: {
100
99
  width: p,
101
100
  ...G
@@ -103,8 +102,8 @@ function ce(i, m) {
103
102
  className: H(
104
103
  s,
105
104
  {
106
- [`${s}-light`]: y === "light",
107
- [`${s}-has-trigger`]: f !== null && h,
105
+ [`${s}-light`]: N === "light",
106
+ [`${s}-has-trigger`]: g !== null && h,
108
107
  [`${s}-collapsed`]: e
109
108
  },
110
109
  E
@@ -0,0 +1,284 @@
1
+ import { jsxs as it, jsx as M } from "react/jsx-runtime";
2
+ import { y as vt, t as At } from "./CnY8SvgY.js";
3
+ import ot from "lodash/isFunction";
4
+ import q from "lodash/isNumber";
5
+ import $t from "lodash/throttle";
6
+ import Rt, { createContext as Tt, forwardRef as ct, useContext as _, useRef as N, useImperativeHandle as st, useEffect as O, isValidElement as Pt, useState as bt, useCallback as D } from "react";
7
+ import Et from "../Affix.js";
8
+ import { b as lt } from "./DUxWiN2U.js";
9
+ import Mt from "../hooks/useIsFirstRender.js";
10
+ import at from "../hooks/useMergeProps.js";
11
+ import Ot from "../hooks/useStateWithPromise.js";
12
+ import { y as ut } from "./Do1aMgY3.js";
13
+ import { on as It, off as Ft } from "../utils/dom.js";
14
+ import { isWindow as ft } from "../utils/is.js";
15
+ import Ht from "lodash/isNull";
16
+ import Dt from "lodash/isPlainObject";
17
+ import G from "lodash/isString";
18
+ import Ut from "lodash/isUndefined";
19
+ import { I as jt, q as zt } from "./CkAOsst1.js";
20
+ const mt = Tt({
21
+ direction: "vertical",
22
+ currentLink: "",
23
+ onLinkClick: () => {
24
+ },
25
+ addLink: () => {
26
+ },
27
+ removeLink: () => {
28
+ }
29
+ }), dt = "AnchorLink", Bt = {
30
+ href: "#"
31
+ };
32
+ function Vt(e) {
33
+ return Dt(e) && Object.prototype.hasOwnProperty.call(e, "displayName");
34
+ }
35
+ function Yt(e, r) {
36
+ const { getPrefixCls: c, componentConfig: s } = _(lt), { className: y, style: j, href: l, title: m, children: u, ...z } = at(
37
+ e,
38
+ Bt,
39
+ s == null ? void 0 : s["Anchor.Link"]
40
+ ), C = _(mt), { currentLink: B, addLink: L, removeLink: S, onLinkClick: v, direction: I } = C, o = c("anchor-link"), A = ut(
41
+ o,
42
+ {
43
+ [`${o}-active`]: B === l
44
+ },
45
+ y
46
+ ), $ = N(null);
47
+ return st(r, () => $.current, []), O(() => (L == null || L(l, $.current), () => {
48
+ S == null || S(l);
49
+ }), [l]), /* @__PURE__ */ it("div", { className: A, style: j, ref: $, ...z, children: [
50
+ !Ut(m) && !Ht(m) && /* @__PURE__ */ M(
51
+ "a",
52
+ {
53
+ className: `${o}-title`,
54
+ title: G(m) ? m : "",
55
+ href: l,
56
+ "data-href": l,
57
+ onClick: (i) => {
58
+ v == null || v(i, l);
59
+ },
60
+ children: m
61
+ }
62
+ ),
63
+ u && I !== "horizontal" && Rt.Children.map(u, (i) => Pt(i) && Vt(i.type) && i.type.displayName === dt && i)
64
+ ] });
65
+ }
66
+ const pt = ct(Yt);
67
+ pt.displayName = dt;
68
+ function U(e, r) {
69
+ const c = G(r) && r[0] === "#" ? `[id='${r.replace("#", "")}']` : r;
70
+ try {
71
+ return e.querySelector(c);
72
+ } catch (s) {
73
+ return console.error(s), null;
74
+ }
75
+ }
76
+ function Wt(e, r, c) {
77
+ new jt({
78
+ from: {
79
+ scrollTop: e.scrollTop
80
+ },
81
+ to: {
82
+ scrollTop: r
83
+ },
84
+ easing: zt,
85
+ duration: 300,
86
+ onUpdate: (y) => {
87
+ e.scrollTop = y.scrollTop;
88
+ },
89
+ onFinish: () => {
90
+ c == null || c();
91
+ }
92
+ }).start();
93
+ }
94
+ function qt(e) {
95
+ return G(e) ? U(document, e) : e || window;
96
+ }
97
+ function _t(e) {
98
+ return ft(e) ? document.documentElement || document.body : e;
99
+ }
100
+ function ht(e) {
101
+ if (e == null)
102
+ return null;
103
+ if (e.tagName === "BODY")
104
+ return e.ownerDocument.documentElement;
105
+ const r = window.getComputedStyle(e).overflowY;
106
+ return r !== "visible" && r !== "hidden" && e.scrollHeight > e.clientHeight ? e : ht(e.parentElement);
107
+ }
108
+ const Gt = {
109
+ animation: !0,
110
+ affix: !0,
111
+ hash: !0,
112
+ boundary: "start"
113
+ };
114
+ function Jt(e, r) {
115
+ const { getPrefixCls: c, componentConfig: s, rtl: y } = _(lt), j = at(
116
+ e,
117
+ Gt,
118
+ s == null ? void 0 : s.Anchor
119
+ ), {
120
+ className: l,
121
+ style: m,
122
+ scrollContainer: u,
123
+ animation: z = !0,
124
+ lineless: C,
125
+ affix: B = !0,
126
+ affixStyle: L,
127
+ offsetBottom: S,
128
+ offsetTop: v,
129
+ hash: I = !0,
130
+ boundary: o = "start",
131
+ targetOffset: A,
132
+ children: $,
133
+ direction: i = "vertical",
134
+ onSelect: J,
135
+ onChange: V,
136
+ ...yt
137
+ } = j, k = c("anchor"), Ct = ut(k, l, {
138
+ [`${k}-lineless`]: C,
139
+ [`${k}-rtl`]: y,
140
+ [`${k}-horizontal`]: i === "horizontal"
141
+ }), d = N(null), R = N(null), w = N(/* @__PURE__ */ new Map()), Y = N(!1), T = N(null), [kt, K] = bt(0), [f, wt] = Ot(""), xt = Mt();
142
+ function Q() {
143
+ let t = qt(u);
144
+ return u || (t = ht(d.current)), t;
145
+ }
146
+ O(() => {
147
+ const t = Q();
148
+ T.current = t;
149
+ }, [u]);
150
+ const Nt = D(() => Q(), [u]);
151
+ st(
152
+ r,
153
+ () => ({
154
+ dom: d.current,
155
+ getRootDOMNode: () => d.current
156
+ }),
157
+ []
158
+ );
159
+ function X(t, n) {
160
+ t && (w.current.set(t, n), K(Math.random()));
161
+ }
162
+ function Lt(t) {
163
+ w.current.delete(t), K(Math.random());
164
+ }
165
+ const F = D(
166
+ (t) => {
167
+ if (!t || !d.current) return;
168
+ if (!w.current.has(t)) {
169
+ const p = U(d.current, `a[data-href='${t}']`);
170
+ p && X(t, p);
171
+ }
172
+ const n = w.current.get(t);
173
+ n && t !== f && (vt(n, {
174
+ behavior: "instant",
175
+ block: "nearest",
176
+ scrollMode: "if-needed",
177
+ boundary: d.current
178
+ }), wt(t).then(() => {
179
+ ot(V) && V(t, f);
180
+ }));
181
+ },
182
+ [f, V]
183
+ ), Z = D(() => {
184
+ let t;
185
+ const n = q(o) ? o : 0, p = T.current, b = _t(p).getBoundingClientRect(), H = document.documentElement.clientHeight;
186
+ return [...w.current.keys()].some((W) => {
187
+ const h = U(document, W);
188
+ let x = !1;
189
+ if (h) {
190
+ const { top: a, height: E } = h.getBoundingClientRect();
191
+ if (ft(p)) {
192
+ const g = A ?? H / 2;
193
+ x = a >= n && a <= g || a <= n && a + E >= g;
194
+ } else {
195
+ const g = a - b.top - n, rt = A ?? b.height / 2;
196
+ x = g >= 0 && g <= rt || g <= 0 && g + E >= rt;
197
+ }
198
+ x && (t = h);
199
+ }
200
+ return x;
201
+ }), t;
202
+ }, [o, A]), P = D(
203
+ $t(
204
+ () => {
205
+ if (Y.current) return;
206
+ const t = Z();
207
+ if (t && t.id) {
208
+ const n = `#${t.id}`;
209
+ F(n);
210
+ }
211
+ },
212
+ 30,
213
+ { trailing: !0 }
214
+ ),
215
+ [Z, F]
216
+ );
217
+ function tt(t) {
218
+ if (t)
219
+ try {
220
+ const n = U(document, t);
221
+ if (!n) return;
222
+ const p = q(o) ? "start" : o, nt = q(o) ? o : 0, b = At(n, { block: p });
223
+ if (!b.length) return;
224
+ let H = !1;
225
+ const W = b.map(({ el: h, top: x }) => new Promise((a) => {
226
+ if (!H) {
227
+ h === T.current && (H = !0);
228
+ const E = x - nt;
229
+ return z ? Wt(h, E, a) : (I || (h.scrollTop = E), a(null));
230
+ }
231
+ a(null);
232
+ }));
233
+ Y.current = !0, Promise.all(W).then(() => {
234
+ Y.current = !1;
235
+ });
236
+ } catch (n) {
237
+ console.error(n);
238
+ }
239
+ }
240
+ function St(t, n) {
241
+ I || t.preventDefault(), F(n), tt(n), ot(J) && J(n, f);
242
+ }
243
+ O(() => {
244
+ const t = decodeURIComponent(location.hash);
245
+ t ? (F(t), tt(t)) : P();
246
+ }, []), O(() => (xt || P(), It(T.current, "scroll", P), () => {
247
+ Ft(T.current, "scroll", P);
248
+ }), [u, P]), O(() => {
249
+ const t = w.current.get(f);
250
+ t && !C && R.current && (i === "horizontal" ? (R.current.style.left = `${t.offsetLeft}px`, R.current.style.width = `${t.clientWidth}px`) : R.current.style.top = `${t.offsetTop}px`);
251
+ }, [f, C, i, y, kt]);
252
+ const et = /* @__PURE__ */ it("div", { className: Ct, style: m, ref: d, ...yt, children: [
253
+ !C && f && /* @__PURE__ */ M("div", { className: `${k}-line-slider`, ref: R }),
254
+ /* @__PURE__ */ M(
255
+ mt.Provider,
256
+ {
257
+ value: {
258
+ direction: i,
259
+ currentLink: f,
260
+ addLink: X,
261
+ removeLink: Lt,
262
+ onLinkClick: St
263
+ },
264
+ children: /* @__PURE__ */ M("div", { className: `${k}-list`, children: $ })
265
+ }
266
+ )
267
+ ] });
268
+ return B ? /* @__PURE__ */ M(
269
+ Et,
270
+ {
271
+ offsetTop: v,
272
+ offsetBottom: S,
273
+ style: L,
274
+ target: Nt,
275
+ children: et
276
+ }
277
+ ) : et;
278
+ }
279
+ const Kt = ct(Jt), gt = Kt;
280
+ gt.displayName = "Anchor";
281
+ gt.Link = pt;
282
+ export {
283
+ gt as A
284
+ };