@unicom-cloud/ui-common 0.1.10 → 0.1.12

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 (374) hide show
  1. package/Development.js +1 -1
  2. package/Empty.js +1 -1
  3. package/Flex.js +1 -1
  4. package/Motion.js +1 -1
  5. package/Progress.js +1 -1
  6. package/ResizeObserver.js +5 -3
  7. package/Space.js +1 -1
  8. package/SuspenseFallbackTest.js +1 -1
  9. package/Timer.js +12 -0
  10. package/TransitionGroup.js +19 -21
  11. package/development/index.js +1 -1
  12. package/empty/index.js +2 -2
  13. package/flex/index.js +1 -1
  14. package/flex/utils.js +1 -1
  15. package/higher-order/index.js +1 -1
  16. package/higher-order/with-speech-synthesis/index.js +1 -1
  17. package/higher-order/withSpeechSynthesis.js +1 -1
  18. package/hooks/create-deep-compare-effect/index.js +1 -1
  19. package/hooks/create-update-effect/index.js +1 -1
  20. package/hooks/create-use-storage-state/index.js +1 -1
  21. package/hooks/createDeepCompareEffect.js +1 -1
  22. package/hooks/createUpdateEffect.js +1 -1
  23. package/hooks/createUseStorageState.js +1 -1
  24. package/hooks/index.js +137 -134
  25. package/hooks/use-async-effect/index.js +1 -1
  26. package/hooks/use-boolean/index.js +1 -1
  27. package/hooks/use-click-away/index.js +1 -1
  28. package/hooks/use-computed-state/index.js +1 -1
  29. package/hooks/use-controllable-value/index.js +1 -1
  30. package/hooks/use-cookie-state/index.js +1 -1
  31. package/hooks/use-count-down/index.js +1 -1
  32. package/hooks/use-counter/index.js +1 -1
  33. package/hooks/use-create/index.js +1 -1
  34. package/hooks/use-creation/index.js +1 -1
  35. package/hooks/use-debounce/index.js +1 -1
  36. package/hooks/use-debounce-effect/index.js +1 -1
  37. package/hooks/use-debounce-fn/index.js +1 -1
  38. package/hooks/use-deep-compare-effect/index.js +1 -1
  39. package/hooks/use-deep-compare-layout-effect/index.js +1 -1
  40. package/hooks/use-document-visibility/index.js +1 -1
  41. package/hooks/use-drag/index.js +1 -1
  42. package/hooks/use-drop/index.js +1 -1
  43. package/hooks/use-event/index.js +1 -1
  44. package/hooks/use-event-listener/index.js +1 -1
  45. package/hooks/use-event-target/index.js +1 -1
  46. package/hooks/use-external/index.js +1 -1
  47. package/hooks/use-favicon/index.js +1 -1
  48. package/hooks/use-focus-within/index.js +1 -1
  49. package/hooks/use-force-update/index.js +1 -1
  50. package/hooks/use-fullscreen/index.js +1 -1
  51. package/hooks/use-get-state/index.js +1 -1
  52. package/hooks/use-history-travel/index.js +1 -1
  53. package/hooks/use-hover/index.js +1 -1
  54. package/hooks/use-id/index.js +1 -1
  55. package/hooks/use-in-view/index.js +1 -1
  56. package/hooks/use-in-viewport/index.js +1 -1
  57. package/hooks/use-infinite-scroll/index.js +1 -1
  58. package/hooks/use-intersection-observer/index.js +1 -1
  59. package/hooks/use-intersection-observers/index.js +1 -1
  60. package/hooks/use-interval/index.js +1 -1
  61. package/hooks/use-is-first-render/index.js +1 -1
  62. package/hooks/use-isomorphic-layout-effect/index.js +1 -1
  63. package/hooks/use-key-press/index.js +1 -1
  64. package/hooks/use-keyboard-event/index.js +1 -1
  65. package/hooks/use-latest/index.js +1 -1
  66. package/hooks/use-listen-window-resize/index.js +1 -1
  67. package/hooks/use-local-storage-state/index.js +1 -1
  68. package/hooks/use-lock-fn/index.js +1 -1
  69. package/hooks/use-long-press/index.js +1 -1
  70. package/hooks/use-map/index.js +1 -1
  71. package/hooks/use-media/index.js +1 -1
  72. package/hooks/use-memo/index.js +1 -1
  73. package/hooks/use-memoized-fn/index.js +1 -1
  74. package/hooks/use-merge-props/index.js +1 -1
  75. package/hooks/use-merge-value/index.js +1 -1
  76. package/hooks/use-mobile/index.js +13 -0
  77. package/hooks/use-mount/index.js +1 -1
  78. package/hooks/use-mouse/index.js +1 -1
  79. package/hooks/use-move/index.js +1 -1
  80. package/hooks/use-mutation-observer/index.js +1 -1
  81. package/hooks/use-mutation-observers/index.js +1 -1
  82. package/hooks/use-network/index.js +1 -1
  83. package/hooks/use-online-status/index.js +1 -1
  84. package/hooks/use-overflow-hidden/index.js +1 -1
  85. package/hooks/use-override-ref/index.js +1 -1
  86. package/hooks/use-pagination/index.js +1 -1
  87. package/hooks/use-paste-image/index.js +1 -1
  88. package/hooks/use-persist-callback/index.js +1 -1
  89. package/hooks/use-prefers-color-scheme-dark/index.js +1 -1
  90. package/hooks/use-previous/index.js +1 -1
  91. package/hooks/use-raf-interval/index.js +1 -1
  92. package/hooks/use-raf-state/index.js +1 -1
  93. package/hooks/use-raf-timeout/index.js +1 -1
  94. package/hooks/use-reactive/index.js +1 -1
  95. package/hooks/use-ref-latest/index.js +1 -1
  96. package/hooks/use-refs/index.js +15 -7
  97. package/hooks/use-request/index.js +1 -1
  98. package/hooks/use-request/src/Fetch.js +1 -1
  99. package/hooks/use-request/src/plugins/useAutoRunPlugin.js +1 -1
  100. package/hooks/use-request/src/plugins/useCachePlugin.js +1 -1
  101. package/hooks/use-request/src/plugins/useDebouncePlugin.js +1 -1
  102. package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +1 -1
  103. package/hooks/use-request/src/plugins/usePollingPlugin.js +1 -1
  104. package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +1 -1
  105. package/hooks/use-request/src/plugins/useRetryPlugin.js +1 -1
  106. package/hooks/use-request/src/plugins/useThrottlePlugin.js +1 -1
  107. package/hooks/use-request/src/useRequest.js +1 -1
  108. package/hooks/use-request/src/useRequestImplement.js +1 -1
  109. package/hooks/use-request/src/utils/cache.js +1 -1
  110. package/hooks/use-request/src/utils/cachePromise.js +1 -1
  111. package/hooks/use-request/src/utils/cacheSubscribe.js +1 -1
  112. package/hooks/use-request/src/utils/isDocumentVisible.js +1 -1
  113. package/hooks/use-request/src/utils/isOnline.js +1 -1
  114. package/hooks/use-request/src/utils/limit.js +1 -1
  115. package/hooks/use-request/src/utils/subscribeFocus.js +1 -1
  116. package/hooks/use-request/src/utils/subscribeReVisible.js +1 -1
  117. package/hooks/use-reset-state/index.js +1 -1
  118. package/hooks/use-resize-observer/index.js +1 -1
  119. package/hooks/use-resize-observers/index.js +1 -1
  120. package/hooks/use-responsive/index.js +26 -25
  121. package/hooks/use-safe-state/index.js +10 -9
  122. package/hooks/use-scroll/index.js +1 -1
  123. package/hooks/use-selections/index.js +1 -1
  124. package/hooks/use-session-storage-state/index.js +1 -1
  125. package/hooks/use-set/index.js +1 -1
  126. package/hooks/use-set-state/index.js +1 -1
  127. package/hooks/use-size/index.js +1 -1
  128. package/hooks/use-state-callback/index.js +1 -1
  129. package/hooks/use-state-with-promise/index.js +1 -1
  130. package/hooks/use-sync-state/index.js +1 -1
  131. package/hooks/use-text-selection/index.js +1 -1
  132. package/hooks/use-theme/index.js +1 -1
  133. package/hooks/use-throttle/index.js +1 -1
  134. package/hooks/use-throttle-effect/index.js +1 -1
  135. package/hooks/use-throttle-fn/index.js +1 -1
  136. package/hooks/use-timeout/index.js +1 -1
  137. package/hooks/use-title/index.js +1 -1
  138. package/hooks/use-toggle/index.js +1 -1
  139. package/hooks/use-tracked-effect/index.js +1 -1
  140. package/hooks/use-unmount/index.js +1 -1
  141. package/hooks/use-unmounted-ref/index.js +1 -1
  142. package/hooks/use-update/index.js +1 -1
  143. package/hooks/use-update-effect/index.js +1 -1
  144. package/hooks/use-update-layout-effect/index.js +3 -3
  145. package/hooks/use-url-state/index.js +1 -1
  146. package/hooks/use-virtual-list/index.js +1 -1
  147. package/hooks/use-watch/index.js +1 -1
  148. package/hooks/use-web-socket/index.js +1 -1
  149. package/hooks/use-why-did-you-update/index.js +1 -1
  150. package/hooks/use-window-size/index.js +1 -1
  151. package/hooks/useAsyncEffect.js +1 -1
  152. package/hooks/useBoolean.js +1 -1
  153. package/hooks/useClickAway.js +1 -1
  154. package/hooks/useComputedState.js +1 -1
  155. package/hooks/useControllableValue.js +1 -1
  156. package/hooks/useCookieState.js +1 -1
  157. package/hooks/useCountDown.js +1 -1
  158. package/hooks/useCounter.js +1 -1
  159. package/hooks/useCreate.js +1 -1
  160. package/hooks/useCreation.js +1 -1
  161. package/hooks/useDebounce.js +1 -1
  162. package/hooks/useDebounceEffect.js +1 -1
  163. package/hooks/useDebounceFn.js +1 -1
  164. package/hooks/useDeepCompareEffect.js +1 -1
  165. package/hooks/useDeepCompareLayoutEffect.js +1 -1
  166. package/hooks/useDocumentVisibility.js +1 -1
  167. package/hooks/useDrag.js +1 -1
  168. package/hooks/useDrop.js +1 -1
  169. package/hooks/useEvent.js +1 -1
  170. package/hooks/useEventListener.js +1 -1
  171. package/hooks/useEventTarget.js +1 -1
  172. package/hooks/useExternal.js +1 -1
  173. package/hooks/useFavicon.js +1 -1
  174. package/hooks/useFocusWithin.js +1 -1
  175. package/hooks/useForceUpdate.js +1 -1
  176. package/hooks/useFullscreen.js +1 -1
  177. package/hooks/useGetState.js +1 -1
  178. package/hooks/useHistoryTravel.js +1 -1
  179. package/hooks/useHover.js +1 -1
  180. package/hooks/useId.js +1 -1
  181. package/hooks/useInView.js +1 -1
  182. package/hooks/useInViewport.js +1 -1
  183. package/hooks/useInfiniteScroll.js +1 -1
  184. package/hooks/useIntersectionObserver.js +1 -1
  185. package/hooks/useIntersectionObservers.js +1 -1
  186. package/hooks/useInterval.js +1 -1
  187. package/hooks/useIsFirstRender.js +1 -1
  188. package/hooks/useIsomorphicLayoutEffect.js +1 -1
  189. package/hooks/useKeyPress.js +1 -1
  190. package/hooks/useKeyboardEvent.js +1 -1
  191. package/hooks/useLatest.js +1 -1
  192. package/hooks/useListenWindowResize.js +1 -1
  193. package/hooks/useLocalStorageState.js +1 -1
  194. package/hooks/useLockFn.js +1 -1
  195. package/hooks/useLongPress.js +1 -1
  196. package/hooks/useMap.js +1 -1
  197. package/hooks/useMedia.js +1 -1
  198. package/hooks/useMemo.js +1 -1
  199. package/hooks/useMemoizedFn.js +1 -1
  200. package/hooks/useMergeProps.js +1 -1
  201. package/hooks/useMergeValue.js +1 -1
  202. package/hooks/useMobile.js +8 -0
  203. package/hooks/useMount.js +1 -1
  204. package/hooks/useMouse.js +1 -1
  205. package/hooks/useMove.js +1 -1
  206. package/hooks/useMutationObserver.js +1 -1
  207. package/hooks/useMutationObservers.js +1 -1
  208. package/hooks/useNetwork.js +1 -1
  209. package/hooks/useOnlineStatus.js +1 -1
  210. package/hooks/useOverflowHidden.js +1 -1
  211. package/hooks/useOverrideRef.js +1 -1
  212. package/hooks/usePagination.js +1 -1
  213. package/hooks/usePasteImage.js +1 -1
  214. package/hooks/usePersistCallback.js +1 -1
  215. package/hooks/usePrefersColorSchemeDark.js +1 -1
  216. package/hooks/usePrevious.js +1 -1
  217. package/hooks/useRafInterval.js +1 -1
  218. package/hooks/useRafState.js +1 -1
  219. package/hooks/useRafTimeout.js +1 -1
  220. package/hooks/useReactive.js +1 -1
  221. package/hooks/useRefLatest.js +1 -1
  222. package/hooks/useRefs.js +5 -3
  223. package/hooks/useRequest.js +1 -1
  224. package/hooks/useResetState.js +1 -1
  225. package/hooks/useResizeObserver.js +1 -1
  226. package/hooks/useResizeObservers.js +1 -1
  227. package/hooks/useResponsive.js +1 -1
  228. package/hooks/useSafeState.js +1 -1
  229. package/hooks/useScroll.js +1 -1
  230. package/hooks/useSelections.js +1 -1
  231. package/hooks/useSessionStorageState.js +1 -1
  232. package/hooks/useSet.js +1 -1
  233. package/hooks/useSetState.js +1 -1
  234. package/hooks/useSize.js +1 -1
  235. package/hooks/useStateCallback.js +1 -1
  236. package/hooks/useStateWithPromise.js +1 -1
  237. package/hooks/useSyncState.js +1 -1
  238. package/hooks/useTextSelection.js +1 -1
  239. package/hooks/useTheme.js +1 -1
  240. package/hooks/useThrottle.js +1 -1
  241. package/hooks/useThrottleEffect.js +1 -1
  242. package/hooks/useThrottleFn.js +1 -1
  243. package/hooks/useTimeout.js +1 -1
  244. package/hooks/useTitle.js +1 -1
  245. package/hooks/useToggle.js +1 -1
  246. package/hooks/useTrackedEffect.js +1 -1
  247. package/hooks/useUnmount.js +1 -1
  248. package/hooks/useUnmountedRef.js +1 -1
  249. package/hooks/useUpdate.js +1 -1
  250. package/hooks/useUpdateEffect.js +1 -1
  251. package/hooks/useUpdateLayoutEffect.js +1 -1
  252. package/hooks/useUrlState.js +1 -1
  253. package/hooks/useVirtualList.js +1 -1
  254. package/hooks/useWatch.js +1 -1
  255. package/hooks/useWebSocket.js +1 -1
  256. package/hooks/useWhyDidYouUpdate.js +1 -1
  257. package/hooks/useWindowSize.js +1 -1
  258. package/hooks/utils/createEffectWithTarget.js +1 -1
  259. package/hooks/utils/depsAreSame.js +1 -1
  260. package/hooks/utils/depsEqual.js +1 -1
  261. package/hooks/utils/domTarget.js +1 -1
  262. package/hooks/utils/getDocumentOrShadow.js +1 -1
  263. package/hooks/utils/index.js +1 -1
  264. package/hooks/utils/isAppleDevice.js +1 -1
  265. package/hooks/utils/isBrowser.js +1 -1
  266. package/hooks/utils/isDev.js +1 -1
  267. package/hooks/utils/rect.js +1 -1
  268. package/hooks/utils/useDeepCompareWithTarget.js +1 -1
  269. package/hooks/utils/useEffectWithTarget.js +1 -1
  270. package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +1 -1
  271. package/hooks/utils/useLayoutEffectWithTarget.js +1 -1
  272. package/hooks/utils.js +1 -1
  273. package/icons/file/index.js +1 -1
  274. package/icons/file.js +1 -1
  275. package/index.js +559 -556
  276. package/motion/CSSMotion.js +34 -32
  277. package/motion/CSSMotionList.js +1 -1
  278. package/motion/context.js +1 -1
  279. package/motion/hooks/useDomMotionEvents.js +1 -1
  280. package/motion/hooks/useNextFrame.js +1 -1
  281. package/motion/hooks/useStatus.js +1 -1
  282. package/motion/hooks/useStepQueue.js +1 -1
  283. package/motion/index.js +1 -1
  284. package/motion/interface.js +1 -1
  285. package/motion/util/diff.js +33 -31
  286. package/motion/util/motion.js +26 -25
  287. package/package.json +1 -1
  288. package/progress/index.js +1 -1
  289. package/resize-observer/Collection.js +1 -1
  290. package/resize-observer/SingleObserver.js +7 -5
  291. package/resize-observer/index.js +13 -11
  292. package/resize-observer/observerUtil.js +1 -1
  293. package/space/index.js +1 -1
  294. package/style.css +1 -1
  295. package/suspense-fallback-test/index.js +1 -1
  296. package/timer/index.js +41 -0
  297. package/transition-group/CSSTransition.js +26 -26
  298. package/transition-group/ChildMapping.js +1 -1
  299. package/transition-group/PqbCSSTransition.js +1 -1
  300. package/transition-group/ReplaceTransition.js +1 -1
  301. package/transition-group/SwitchTransition.js +1 -1
  302. package/transition-group/Transition.js +28 -29
  303. package/transition-group/TransitionGroup.js +1 -1
  304. package/transition-group/TransitionGroupContext.js +1 -1
  305. package/transition-group/index.js +19 -21
  306. package/types/higher-order/with-speech-synthesis/style/index.d.ts +2 -0
  307. package/types/hooks/index.d.ts +2 -1
  308. package/types/hooks/use-mobile/index.d.ts +6 -0
  309. package/types/hooks/use-refs/index.d.ts +2 -0
  310. package/types/hooks/use-safe-state/index.d.ts +13 -6
  311. package/types/hooks/use-update-effect/index.d.ts +2 -2
  312. package/types/hooks/use-update-layout-effect/index.d.ts +2 -2
  313. package/types/icons/file/style/index.d.ts +2 -0
  314. package/types/index.d.ts +2 -0
  315. package/types/motion/CSSMotion.d.ts +3 -3
  316. package/types/motion/CSSMotionList.d.ts +4 -4
  317. package/types/timer/index.d.ts +3 -0
  318. package/types/timer/interface.d.ts +10 -0
  319. package/types/transition-group/index.d.ts +1 -2
  320. package/utils/callOrReturn.js +1 -1
  321. package/utils/callbackOriginRef.js +1 -1
  322. package/utils/caseName.js +1 -1
  323. package/utils/className.js +1 -1
  324. package/utils/compute.js +1 -1
  325. package/utils/constant.js +1 -1
  326. package/utils/copy.js +1 -1
  327. package/utils/date.js +1 -1
  328. package/utils/dayjs.js +1 -1
  329. package/utils/dom.js +1 -1
  330. package/utils/emitter.js +1 -1
  331. package/utils/fileRead.js +1 -1
  332. package/utils/fileToDataURL.js +1 -1
  333. package/utils/fillNBSP.js +1 -1
  334. package/utils/findRootElement.js +7 -8
  335. package/utils/findScrollParent.js +1 -1
  336. package/utils/getHighlightText.js +1 -1
  337. package/utils/getHotkeyHandler.js +1 -1
  338. package/utils/getStringLength.js +1 -1
  339. package/utils/include.js +1 -1
  340. package/utils/index.js +1 -1
  341. package/utils/intersectionObserver.js +1 -1
  342. package/utils/is.js +1 -1
  343. package/utils/keyboardCode.js +1 -1
  344. package/utils/lodash.js +1 -1
  345. package/utils/math.js +1 -1
  346. package/utils/mergeProps.js +1 -1
  347. package/utils/mergedToString.js +1 -1
  348. package/utils/mutationObserver.js +1 -1
  349. package/utils/omit.js +1 -1
  350. package/utils/pad.js +1 -1
  351. package/utils/pick.js +1 -1
  352. package/utils/pinyin.js +1 -1
  353. package/utils/react19Adapter.js +1 -1
  354. package/utils/ref.js +1 -1
  355. package/utils/resizeObserver.js +1 -1
  356. package/utils/saveAs.js +1 -1
  357. package/utils/screenfull.js +1 -1
  358. package/utils/scrollIntoViewIfNeeded.js +1 -1
  359. package/utils/setCreateRoot.js +1 -1
  360. package/utils/setDarkTheme.js +1 -1
  361. package/utils/setDir.js +1 -1
  362. package/utils/setPrimaryColor.js +1 -1
  363. package/utils/setTheme.js +1 -1
  364. package/utils/string.js +1 -1
  365. package/utils/style.js +1 -1
  366. package/utils/throttleByRaf.js +1 -1
  367. package/utils/throttleByRaf2.js +1 -1
  368. package/utils/tinycolor.js +1 -1
  369. package/utils/toArray.js +1 -1
  370. package/utils/tree.js +1 -1
  371. package/utils/tween.js +1 -1
  372. package/utils/uuid.js +1 -1
  373. package/utils/validate.js +1 -1
  374. package/utils/warning.js +1 -1
@@ -1,17 +1,19 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import o, { useRef as _ } from "react";
3
3
  import h from "@unicom-cloud/utils/class-name";
4
- import { findRootElement as V } from "../utils/findRootElement.js";
5
- import { supportRef as $, getReactElementRef as w } from "../utils/ref.js";
6
- import { Context as D } from "./context.js";
7
- import H from "./hooks/useStatus.js";
8
- import { isActive as I } from "./hooks/useStepQueue.js";
9
- import { STATUS_NONE as M, STEP_PREPARE as L, STEP_START as U } from "./interface.js";
10
- import { getTransitionName as T, supportTransition as k } from "./util/motion.js";
11
- function q(m) {
12
- let S = m;
13
- typeof m == "object" && ({ transitionSupport: S } = m);
14
- function y(r, f) {
4
+ import { findRootElement as L } from "../utils/findRootElement.js";
5
+ import "../utils/is.js";
6
+ import { supportRef as V, getReactElementRef as $ } from "../utils/ref.js";
7
+ import { Context as k } from "./context.js";
8
+ import w from "./hooks/useStatus.js";
9
+ import { isActive as D } from "./hooks/useStepQueue.js";
10
+ import { STATUS_NONE as M, STEP_PREPARE as H, STEP_START as I } from "./interface.js";
11
+ import { getTransitionName as T, supportTransition as U } from "./util/motion.js";
12
+ import { isObjectLike as q, isString as z } from "@unicom-cloud/utils/is";
13
+ function B(l) {
14
+ let S = l;
15
+ q(l) && ({ transitionSupport: S } = l);
16
+ function P(r, f) {
15
17
  return !!(r.motionName && S && f !== !1);
16
18
  }
17
19
  const d = o.forwardRef(
@@ -20,23 +22,23 @@ function q(m) {
20
22
  // Default config
21
23
  visible: R = !0,
22
24
  removeOnLeave: g = !0,
23
- forceRender: P,
25
+ forceRender: x,
24
26
  children: i,
25
27
  motionName: s,
26
28
  leavedClassName: u,
27
- eventProps: x
28
- } = r, { motion: j } = o.useContext(D), E = y(r, j), n = _(null);
29
+ eventProps: y
30
+ } = r, { motion: O } = o.useContext(k), E = P(r, O), n = _(null);
29
31
  function N() {
30
- return V(n);
32
+ return L(n);
31
33
  }
32
- const [b, a, A, c] = H(
34
+ const [b, a, j, c] = w(
33
35
  E,
34
36
  R,
35
37
  N,
36
38
  r
37
39
  ), p = b(), v = o.useRef(c);
38
40
  c && (v.current = !0);
39
- const O = o.useMemo(() => {
41
+ const A = o.useMemo(() => {
40
42
  const t = {};
41
43
  return Object.defineProperties(t, {
42
44
  nativeElement: {
@@ -53,39 +55,39 @@ function q(m) {
53
55
  }
54
56
  }), t;
55
57
  }, []);
56
- o.useImperativeHandle(f, () => O, []);
58
+ o.useImperativeHandle(f, () => A, []);
57
59
  let e;
58
- const l = { ...x, visible: R };
60
+ const m = { ...y, visible: R };
59
61
  if (!i)
60
62
  e = null;
61
63
  else if (p === M)
62
- c ? e = i({ ...l }, n) : !g && v.current && u ? e = i(
63
- { ...l, className: u },
64
+ c ? e = i({ ...m }, n) : !g && v.current && u ? e = i(
65
+ { ...m, className: u },
64
66
  n
65
- ) : P || !g && !u ? e = i(
66
- { ...l, style: { display: "none" } },
67
+ ) : x || !g && !u ? e = i(
68
+ { ...m, style: { display: "none" } },
67
69
  n
68
70
  ) : e = null;
69
71
  else {
70
72
  let t;
71
- a === L ? t = "prepare" : I(a) ? t = "active" : a === U && (t = "start");
73
+ a === H ? t = "prepare" : D(a) ? t = "active" : a === I && (t = "start");
72
74
  const C = T(
73
75
  s,
74
76
  `${p}-${t}`
75
77
  );
76
78
  e = i(
77
79
  {
78
- ...l,
80
+ ...m,
79
81
  className: h(T(s, p), {
80
82
  [C]: C && t,
81
- [s]: typeof s == "string"
83
+ [s]: z(s)
82
84
  }),
83
- style: A
85
+ style: j
84
86
  },
85
87
  n
86
88
  );
87
89
  }
88
- return o.isValidElement(e) && $(e) && (w(e) || (e = o.cloneElement(
90
+ return o.isValidElement(e) && V(e) && ($(e) || (e = o.cloneElement(
89
91
  e,
90
92
  {
91
93
  ref: n
@@ -95,8 +97,8 @@ function q(m) {
95
97
  );
96
98
  return d.displayName = "CSSMotion", d;
97
99
  }
98
- const Y = q(k);
100
+ const oe = B(U);
99
101
  export {
100
- Y as default,
101
- q as genCSSMotion
102
+ oe as default,
103
+ B as genCSSMotion
102
104
  };
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import { jsx as f } from "react/jsx-runtime";
3
3
  import l, { createElement as A } from "react";
4
4
  import h from "./CSSMotion.js";
package/motion/context.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import { jsx as r } from "react/jsx-runtime";
3
3
  import e from "react";
4
4
  const n = e.createContext({});
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import f, { useRef as s } from "react";
3
3
  import { transitionEndName as c, animationEndName as u } from "../util/motion.js";
4
4
  function a(e) {
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import a from "react";
3
3
  function f() {
4
4
  const e = a.useRef(null);
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import Q, { useRef as d, useEffect as x } from "react";
3
3
  import st from "../../hooks/use-event/index.js";
4
4
  import ct from "../../hooks/use-isomorphic-layout-effect/index.js";
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import l from "react";
3
3
  import x from "../../hooks/use-isomorphic-layout-effect/index.js";
4
4
  import A from "../../hooks/use-safe-state/index.js";
package/motion/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import t from "./CSSMotion.js";
3
3
  import { default as a } from "./CSSMotionList.js";
4
4
  import { default as i } from "./context.js";
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  const T = "none", E = "appear", n = "enter", t = "leave", S = "none", e = "prepare", o = "start", A = "active", P = "end", c = "prepared";
3
3
  export {
4
4
  E as STATUS_APPEAR,
@@ -1,56 +1,58 @@
1
- /* 2025-12-22 09:21:00 */
2
- const d = "add", l = "keep", p = "remove", b = "removed";
3
- function E(s) {
4
- let n;
5
- return s && typeof s == "object" && "key" in s ? n = s : n = { key: s }, {
6
- ...n,
7
- key: String(n.key)
1
+ /* 2025-12-30 17:27:19 */
2
+ import "../../utils/is.js";
3
+ import { isObjectLike as d } from "@unicom-cloud/utils/is";
4
+ const l = "add", p = "keep", E = "remove", K = "removed";
5
+ function O(s) {
6
+ let r;
7
+ return s && d(s) && "key" in s ? r = s : r = { key: s }, {
8
+ ...r,
9
+ key: String(r.key)
8
10
  };
9
11
  }
10
- function S(s = []) {
11
- return s.map(E);
12
+ function y(s = []) {
13
+ return s.map(O);
12
14
  }
13
- function h(s = [], n = []) {
14
- let e = [], r = 0;
15
- const f = n.length, T = S(s), a = S(n);
16
- T.forEach((t) => {
15
+ function j(s = [], r = []) {
16
+ let e = [], n = 0;
17
+ const f = r.length, S = y(s), a = y(r);
18
+ S.forEach((t) => {
17
19
  let o = !1;
18
- for (let c = r; c < f; c += 1) {
20
+ for (let c = n; c < f; c += 1) {
19
21
  const u = a[c];
20
22
  if (u.key === t.key) {
21
- r < c && (e = e.concat(
22
- a.slice(r, c).map((y) => ({ ...y, status: "add" }))
23
- ), r = c), e.push({
23
+ n < c && (e = e.concat(
24
+ a.slice(n, c).map((T) => ({ ...T, status: l }))
25
+ ), n = c), e.push({
24
26
  ...u,
25
- status: l
26
- }), r += 1, o = !0;
27
+ status: p
28
+ }), n += 1, o = !0;
27
29
  break;
28
30
  }
29
31
  }
30
32
  o || e.push({
31
33
  ...t,
32
- status: p
34
+ status: E
33
35
  });
34
- }), r < f && (e = e.concat(
35
- a.slice(r).map((t) => ({ ...t, status: "add" }))
36
+ }), n < f && (e = e.concat(
37
+ a.slice(n).map((t) => ({ ...t, status: l }))
36
38
  ));
37
39
  const i = {};
38
40
  return e.forEach(({ key: t }) => {
39
41
  i[t] = (i[t] || 0) + 1;
40
42
  }), Object.keys(i).filter((t) => i[t] > 1).forEach((t) => {
41
43
  e = e.filter(
42
- ({ key: o, status: c }) => o !== t || c !== p
44
+ ({ key: o, status: c }) => o !== t || c !== E
43
45
  ), e.forEach((o) => {
44
- o.key === t && (o.status = l);
46
+ o.key === t && (o.status = p);
45
47
  });
46
48
  }), e;
47
49
  }
48
50
  export {
49
- d as STATUS_ADD,
50
- l as STATUS_KEEP,
51
- p as STATUS_REMOVE,
52
- b as STATUS_REMOVED,
53
- h as diffKeys,
54
- S as parseKeys,
55
- E as wrapKeyToObject
51
+ l as STATUS_ADD,
52
+ p as STATUS_KEEP,
53
+ E as STATUS_REMOVE,
54
+ K as STATUS_REMOVED,
55
+ j as diffKeys,
56
+ y as parseKeys,
57
+ O as wrapKeyToObject
56
58
  };
@@ -1,20 +1,21 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import d from "@unicom-cloud/utils/dom-helpers/canUseDOM";
3
3
  import "@unicom-cloud/utils/dom-helpers/getElementCoordinates";
4
4
  import "@unicom-cloud/utils/dom-helpers/reflow";
5
5
  import "../../utils/is.js";
6
- function a(n, t) {
7
- const i = {};
8
- return i[n.toLowerCase()] = t.toLowerCase(), i[`Webkit${n}`] = `webkit${t}`, i[`Moz${n}`] = `moz${t}`, i[`ms${n}`] = `MS${t}`, i[`O${n}`] = `o${t.toLowerCase()}`, i;
6
+ import { isObjectLike as u } from "@unicom-cloud/utils/is";
7
+ function a(n, i) {
8
+ const t = {};
9
+ return t[n.toLowerCase()] = i.toLowerCase(), t[`Webkit${n}`] = `webkit${i}`, t[`Moz${n}`] = `moz${i}`, t[`ms${n}`] = `MS${i}`, t[`O${n}`] = `o${i.toLowerCase()}`, t;
9
10
  }
10
- function u(n, t) {
11
- const i = {
11
+ function l(n, i) {
12
+ const t = {
12
13
  animationend: a("Animation", "AnimationEnd"),
13
14
  transitionend: a("Transition", "TransitionEnd")
14
15
  };
15
- return n && ("AnimationEvent" in t || delete i.animationend.animation, "TransitionEvent" in t || delete i.transitionend.transition), i;
16
+ return n && ("AnimationEvent" in i || delete t.animationend.animation, "TransitionEvent" in i || delete t.transitionend.transition), t;
16
17
  }
17
- const l = u(
18
+ const E = l(
18
19
  d,
19
20
  typeof window < "u" ? window : {}
20
21
  );
@@ -24,34 +25,34 @@ const o = {};
24
25
  function f(n) {
25
26
  if (o[n])
26
27
  return o[n];
27
- const t = l[n];
28
- if (t) {
29
- const i = Object.keys(t), e = i.length;
28
+ const i = E[n];
29
+ if (i) {
30
+ const t = Object.keys(i), e = t.length;
30
31
  for (let r = 0; r < e; r += 1) {
31
- const s = i[r];
32
- if (Object.prototype.hasOwnProperty.call(t, s) && s in c)
33
- return o[n] = t[s], o[n];
32
+ const s = t[r];
33
+ if (Object.prototype.hasOwnProperty.call(i, s) && s in c)
34
+ return o[n] = i[s], o[n];
34
35
  }
35
36
  }
36
37
  return "";
37
38
  }
38
- const p = f("animationend"), m = f("transitionend"), b = !!(p && m), g = p || "animationend", M = m || "transitionend";
39
- function O(n, t) {
39
+ const p = f("animationend"), m = f("transitionend"), g = !!(p && m), k = p || "animationend", L = m || "transitionend";
40
+ function M(n, i) {
40
41
  if (!n) return null;
41
- if (typeof n == "object") {
42
- const i = t.replace(
42
+ if (u(n)) {
43
+ const t = i.replace(
43
44
  /-\w/g,
44
45
  (e) => e[1].toUpperCase()
45
46
  );
46
- return n[i];
47
+ return n[t];
47
48
  }
48
- return `${n}-${t}`;
49
+ return `${n}-${i}`;
49
50
  }
50
51
  export {
51
- g as animationEndName,
52
- O as getTransitionName,
52
+ k as animationEndName,
53
+ M as getTransitionName,
53
54
  f as getVendorPrefixedEventName,
54
- u as getVendorPrefixes,
55
- b as supportTransition,
56
- M as transitionEndName
55
+ l as getVendorPrefixes,
56
+ g as supportTransition,
57
+ L as transitionEndName
57
58
  };
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@unicom-cloud/ui-common","version":"0.1.10","dependencies":{"@unicom-cloud/utils":"^0.1.0","@unicom-cloud/icons":"^0.1.0"},"peerDependencies":{"dayjs":"^1.11.19","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1","react-is":"^18.3.1"},"type":"module","types":"types/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
1
+ {"name":"@unicom-cloud/ui-common","version":"0.1.12","dependencies":{"@unicom-cloud/utils":"^0.1.0","@unicom-cloud/icons":"^0.1.0"},"peerDependencies":{"dayjs":"^1.11.19","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1","react-is":"^18.3.1"},"type":"module","types":"types/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
package/progress/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import { UI_COMMON_PREFIX as a } from "@unicom-cloud/utils/constant/ui";
3
3
  import "../utils/is.js";
4
4
  import { isNumber as u } from "@unicom-cloud/utils/is";
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import { jsx as R } from "react/jsx-runtime";
3
3
  import e from "react";
4
4
  const i = e.createContext(null);
@@ -1,16 +1,18 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import e from "react";
3
3
  import { findRootElement as I } from "../utils/findRootElement.js";
4
- import { supportRef as S, getReactElementRef as y, useComposeRef as P } from "../utils/ref.js";
5
- import { CollectionContext as k } from "./Collection.js";
4
+ import "../utils/is.js";
5
+ import { supportRef as S, getReactElementRef as P, useComposeRef as k } from "../utils/ref.js";
6
+ import { CollectionContext as y } from "./Collection.js";
6
7
  import { observe as B, unobserve as D } from "./observerUtil.js";
8
+ import { isFunction as F } from "@unicom-cloud/utils/is";
7
9
  function N(f, H) {
8
- const { children: c, disabled: h } = f, r = e.useRef(null), z = e.useContext(k), u = typeof c == "function", n = u ? c(r) : c, o = e.useRef({
10
+ const { children: c, disabled: h } = f, r = e.useRef(null), z = e.useContext(y), u = F(c), n = u ? c(r) : c, o = e.useRef({
9
11
  width: -1,
10
12
  height: -1,
11
13
  offsetWidth: -1,
12
14
  offsetHeight: -1
13
- }), m = !u && e.isValidElement(n) && S(n), W = m ? y(n) : null, w = P(W, r), R = () => I(r);
15
+ }), m = !u && e.isValidElement(n) && S(n), W = m ? P(n) : null, w = k(W, r), R = () => I(r);
14
16
  e.useImperativeHandle(H, () => R());
15
17
  const g = e.useRef(f);
16
18
  g.current = f;
@@ -1,11 +1,13 @@
1
- /* 2025-12-22 09:21:00 */
2
- import c, { createElement as m } from "react";
1
+ /* 2025-12-30 17:27:19 */
2
+ import f, { createElement as m } from "react";
3
+ import "../utils/is.js";
3
4
  import { toArray as a } from "../utils/toArray.js";
4
5
  import { warning as t } from "../utils/warning.js";
5
- import { Collection as d } from "./Collection.js";
6
- import p from "./SingleObserver.js";
7
- function v(o, f) {
8
- const { children: e } = o, r = typeof e == "function" ? [e] : a(e);
6
+ import { Collection as p } from "./Collection.js";
7
+ import d from "./SingleObserver.js";
8
+ import { isFunction as v } from "@unicom-cloud/utils/is";
9
+ function h(o, l) {
10
+ const { children: e } = o, r = v(e) ? [e] : a(e);
9
11
  return process.env.NODE_ENV !== "production" && (r.length > 1 ? t(
10
12
  !1,
11
13
  "Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."
@@ -13,15 +15,15 @@ function v(o, f) {
13
15
  !1,
14
16
  "`children` of ResizeObserver is empty. Nothing is in observe."
15
17
  )), r.map((i, n) => {
16
- const l = i?.key || `observer-key-${n}`;
17
- return /* @__PURE__ */ m(p, { ...o, key: l, ref: n === 0 ? f : void 0 }, i);
18
+ const c = i?.key || `observer-key-${n}`;
19
+ return /* @__PURE__ */ m(d, { ...o, key: c, ref: n === 0 ? l : void 0 }, i);
18
20
  });
19
21
  }
20
- const s = c.forwardRef(
21
- v
22
+ const s = f.forwardRef(
23
+ h
22
24
  );
23
25
  process.env.NODE_ENV !== "production" && (s.displayName = "ResizeObserver");
24
- s.Collection = d;
26
+ s.Collection = p;
25
27
  export {
26
28
  s as default
27
29
  };
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  const s = /* @__PURE__ */ new Map();
3
3
  function f(e) {
4
4
  e.forEach((r) => {
package/space/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import { jsx as o, jsxs as k } from "react/jsx-runtime";
3
3
  import { UI_COMMON_PREFIX as H } from "@unicom-cloud/utils/constant/ui";
4
4
  import { forwardRef as g, useRef as O, useImperativeHandle as _, Fragment as A } from "react";
package/style.css CHANGED
@@ -1 +1 @@
1
- :root{--pi: 3.141592653589793}@keyframes pqbc-keyframes-vibrate{0%{transform:translate(0)}20%{transform:translate(-2px,2px)}40%{transform:translate(-2px,-2px)}60%{transform:translate(2px,2px)}80%{transform:translate(2px,-2px)}to{transform:translate(0)}}@keyframes pqbc-keyframes-rotate-360deg{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes pqbc-keyframes-blink{0%{opacity:1}50%{opacity:0}to{opacity:1}}.pqbc-animation-rotate-360deg{animation:pqbc-keyframes-rotate-360deg 1s infinite cubic-bezier(0,0,1,1)}.pqbc-animation-vibrate{animation:pqbc-keyframes-vibrate .3s linear infinite both}.pqbc-animation-blink-enter,.pqbc-animation-blink-appear{opacity:0}.pqbc-animation-blink-enter-active,.pqbc-animation-blink-appear-active{opacity:1;transition:opacity .3s linear}.pqbc-animation-blink-enter-done{animation:pqbc-keyframes-blink .5s linear}.pqbc-display-none{display:none!important}.pqbc-visibility-hidden{visibility:hidden!important}.pqbc-overflow-hidden{overflow:hidden}.pqbc-cursor-pointer{cursor:pointer}.pqbc-filter-invert-100{filter:invert(100%)}.pqbc-filter-grayscale-100{filter:grayscale(100%)}.pqbc-isolation-isolate{isolation:isolate}.pqbc-direction-rtl{direction:rtl}.pqbc-line-height-1{line-height:1}.pqbc-text-overflow-ellipsis{text-overflow:ellipsis;white-space:nowrap;word-break:break-all;overflow:hidden}.pqbc-line-clamp-2,.pqbc-line-clamp-3,.pqbc-line-clamp-4,.pqbc-line-clamp-5{display:-webkit-box;display:-moz-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal}.pqbc-line-clamp-2{line-clamp:2;-webkit-line-clamp:2}.pqbc-line-clamp-3{line-clamp:3;-webkit-line-clamp:3}.pqbc-line-clamp-4{line-clamp:4;-webkit-line-clamp:4}.pqbc-line-clamp-5{line-clamp:5;-webkit-line-clamp:5}.pqb-theme-dark,.pqbm-theme-dark,.pqb-theme-dark *,.pqbm-theme-dark *{color-scheme:dark}[dir=rtl] *{direction:rtl}.pqbc-empty{width:100%}.pqbc-empty .pqbc-empty-description{line-height:1}.pqbc-development{width:100%;height:100%;min-height:400px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px}.pqbc-development-icon,.pqbc-development-img{width:50px;height:50px}.pqbc-development-label{font-size:20px;--color-neutral: #868788;color:var(--pqbc-color-neutral-6, var(--pqb-color-neutral-6, var(--pqbm-color-neutral-6, --color-neutral)))}.pqbc-space-vertical{width:100%}.pqbc-space-rtl{direction:rtl}.pqbc-icons-file{position:relative}.pqbc-icons-file-svg{width:30px;height:30px}.pqbc-icons-file-svg-bg{--primary: 26, 94, 255;fill:rgb(var(--pqbc-primary-6, var(--pqb-primary-6, var(--pqbm-primary-6, --primary))))}.pqbc-icons-file-svg-tr{fill:#fff;fill-opacity:.7}.pqbc-icons-file-svg-text{fill:#fff;font-weight:bolder;font-size:66px;text-align:center}.pqbc-flex{display:flex;margin:0;padding:0;box-sizing:border-box}.pqbc-flex-inline{display:inline-flex}.pqbc-flex:empty{display:none}.pqbc-flex-rtl{direction:rtl}.pqbc-progress{pointer-events:none}.pqbc-progress-bar{--primary: 26, 94, 255;background-color:rgb(var(--pqbc-primary-6, var(--pqb-primary-6, var(--pqbm-primary-6, --primary))));position:fixed;z-index:870227;inset-block-start:0;inset-inline-start:0;width:100%;height:2px}
1
+ :root{--pi: 3.141592653589793}@keyframes pqbc-keyframes-vibrate{0%{transform:translate(0)}20%{transform:translate(-2px,2px)}40%{transform:translate(-2px,-2px)}60%{transform:translate(2px,2px)}80%{transform:translate(2px,-2px)}to{transform:translate(0)}}@keyframes pqbc-keyframes-rotate-360deg{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes pqbc-keyframes-blink{0%{opacity:1}50%{opacity:0}to{opacity:1}}.pqbc-animation-rotate-360deg{animation:pqbc-keyframes-rotate-360deg 1s infinite cubic-bezier(0,0,1,1)}.pqbc-animation-vibrate{animation:pqbc-keyframes-vibrate .3s linear infinite both}.pqbc-animation-blink-enter,.pqbc-animation-blink-appear{opacity:0}.pqbc-animation-blink-enter-active,.pqbc-animation-blink-appear-active{opacity:1;transition:opacity .3s linear}.pqbc-animation-blink-enter-done{animation:pqbc-keyframes-blink .5s linear}.pqbc-display-none{display:none!important}.pqbc-visibility-hidden{visibility:hidden!important}.pqbc-overflow-hidden{overflow:hidden}.pqbc-cursor-pointer{cursor:pointer}.pqbc-filter-invert-100{filter:invert(100%)}.pqbc-filter-grayscale-100{filter:grayscale(100%)}.pqbc-isolation-isolate{isolation:isolate}.pqbc-direction-rtl{direction:rtl}.pqbc-line-height-1{line-height:1}.pqbc-text-overflow-ellipsis{text-overflow:ellipsis;white-space:nowrap;word-break:break-all;overflow:hidden}.pqbc-line-clamp-2,.pqbc-line-clamp-3,.pqbc-line-clamp-4,.pqbc-line-clamp-5{display:-webkit-box;display:-moz-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal}.pqbc-line-clamp-2{line-clamp:2;-webkit-line-clamp:2}.pqbc-line-clamp-3{line-clamp:3;-webkit-line-clamp:3}.pqbc-line-clamp-4{line-clamp:4;-webkit-line-clamp:4}.pqbc-line-clamp-5{line-clamp:5;-webkit-line-clamp:5}.pqb-theme-dark,.pqbm-theme-dark,.pqb-theme-dark *,.pqbm-theme-dark *{color-scheme:dark}[dir=rtl] *,.pqbc-with-speech-synthesis-rtl{direction:rtl}.pqbc-empty{width:100%}.pqbc-empty .pqbc-empty-description{line-height:1}.pqbc-development{width:100%;height:100%;min-height:300px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px}.pqbc-development-icon,.pqbc-development-img{width:50px;height:50px}.pqbc-development-label{font-size:20px;--color-neutral: #868788;color:var(--pqbc-color-neutral-6, var(--pqb-color-neutral-6, var(--pqbm-color-neutral-6, --color-neutral)))}.pqbc-space-vertical{width:100%}.pqbc-space-rtl{direction:rtl}.pqbc-icons-file{position:relative}.pqbc-icons-file-svg{width:30px;height:30px}.pqbc-icons-file-svg-bg{--primary: 26, 94, 255;fill:rgb(var(--pqbc-primary-6, var(--pqb-primary-6, var(--pqbm-primary-6, --primary))))}.pqbc-icons-file-svg-tr{fill:#fff;fill-opacity:.7}.pqbc-icons-file-svg-text{fill:#fff;font-weight:bolder;font-size:66px;text-align:center}.pqbc-flex{display:flex;margin:0;padding:0;box-sizing:border-box}.pqbc-flex-inline{display:inline-flex}.pqbc-flex:empty{display:none}.pqbc-flex-rtl{direction:rtl}.pqbc-progress{pointer-events:none}.pqbc-progress-bar{--primary: 26, 94, 255;background-color:rgb(var(--pqbc-primary-6, var(--pqb-primary-6, var(--pqbm-primary-6, --primary))));position:fixed;z-index:870227;inset-block-start:0;inset-inline-start:0;width:100%;height:2px}.pqbc-timer-rtl{direction:rtl}
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import { jsx as o } from "react/jsx-runtime";
3
3
  import e from "react";
4
4
  const a = (n, r) => {
package/timer/index.js ADDED
@@ -0,0 +1,41 @@
1
+ /* 2025-12-30 17:27:19 */
2
+ import { jsx as d } from "react/jsx-runtime";
3
+ import { UI_COMMON_PREFIX as p } from "@unicom-cloud/utils/constant/ui";
4
+ import w from "dayjs";
5
+ import { forwardRef as R, useState as E, useEffect as F, useRef as M, useImperativeHandle as Y } from "react";
6
+ import x from "@unicom-cloud/utils/class-name";
7
+ import "../utils/is.js";
8
+ import { isFunction as H } from "@unicom-cloud/utils/is";
9
+ function I(i, s) {
10
+ const {
11
+ style: N,
12
+ className: a,
13
+ format: f = "YYYY-MM-DD HH:mm:ss dddd",
14
+ callback: t,
15
+ ...g
16
+ } = i, c = `${p}-timer`, [u, l] = E({ time: e() });
17
+ function e() {
18
+ return w().format(f);
19
+ }
20
+ F(() => {
21
+ let o = n();
22
+ function n(m = e()) {
23
+ return H(t) && t(m), window.requestAnimationFrame(() => {
24
+ l({ time: m }), o = n();
25
+ });
26
+ }
27
+ return () => {
28
+ window.cancelAnimationFrame(o);
29
+ };
30
+ }, []);
31
+ const r = M(null);
32
+ return Y(s, () => ({
33
+ getRootElement() {
34
+ return r.current;
35
+ }
36
+ })), /* @__PURE__ */ d("div", { ref: r, className: x(c, a), children: u.time });
37
+ }
38
+ const S = R(I);
39
+ export {
40
+ S as default
41
+ };
@@ -1,19 +1,19 @@
1
- /* 2025-12-22 09:21:00 */
2
- import { jsx as h } from "react/jsx-runtime";
3
- import m from "react";
1
+ /* 2025-12-30 17:27:19 */
2
+ import { jsx as m } from "react/jsx-runtime";
3
+ import d from "react";
4
4
  import "@unicom-cloud/utils/dom-helpers/canUseDOM";
5
5
  import "@unicom-cloud/utils/dom-helpers/getElementCoordinates";
6
- import d from "@unicom-cloud/utils/dom-helpers/reflow";
6
+ import c from "@unicom-cloud/utils/dom-helpers/reflow";
7
7
  import "../utils/is.js";
8
- import { findRootElement as c } from "../utils/findRootElement.js";
9
- import E from "./Transition.js";
10
- import { isString as a } from "@unicom-cloud/utils/is";
11
- function o(r, t, s = "add") {
12
- r instanceof Element && t && a(t) && t.split(" ").filter(Boolean).forEach((e, i, n) => {
13
- r.classList[s](e);
8
+ import { findRootElement as E } from "../utils/findRootElement.js";
9
+ import f from "./Transition.js";
10
+ import { isFunction as o, isString as p } from "@unicom-cloud/utils/is";
11
+ function r(a, t, s = "add") {
12
+ a instanceof Element && t && p(t) && t.split(" ").filter(Boolean).forEach((e, i, n) => {
13
+ a.classList[s](e);
14
14
  });
15
15
  }
16
- class S extends m.Component {
16
+ class R extends d.Component {
17
17
  constructor() {
18
18
  super(...arguments), this.appliedClasses = {
19
19
  appear: {},
@@ -24,37 +24,37 @@ class S extends m.Component {
24
24
  t,
25
25
  s
26
26
  );
27
- this.removeClasses(e, "exit"), this.addClass(e, i ? "appear" : "enter", "base"), this.props.onEnter && this.props.onEnter(e, s);
27
+ this.removeClasses(e, "exit"), this.addClass(e, i ? "appear" : "enter", "base"), o(this.props.onEnter) && this.props.onEnter(e, s);
28
28
  }, this.onEntering = (t, s) => {
29
29
  const [e, i] = this.resolveArguments(
30
30
  t,
31
31
  s
32
32
  ), n = i ? "appear" : "enter";
33
- this.addClass(e, n, "active"), this.props.onEntering && this.props.onEntering(e, s);
33
+ this.addClass(e, n, "active"), o(this.props.onEntering) && this.props.onEntering(e, s);
34
34
  }, this.onEntered = (t, s) => {
35
35
  const [e, i] = this.resolveArguments(
36
36
  t,
37
37
  s
38
38
  ), n = i ? "appear" : "enter";
39
- this.removeClasses(e, n), this.addClass(e, n, "done"), this.props.onEntered && this.props.onEntered(e, s);
39
+ this.removeClasses(e, n), this.addClass(e, n, "done"), o(this.props.onEntered) && this.props.onEntered(e, s);
40
40
  }, this.onExit = (t) => {
41
41
  const [s] = this.resolveArguments(t);
42
- this.removeClasses(s, "appear"), this.removeClasses(s, "enter"), this.addClass(s, "exit", "base"), this.props.onExit && this.props.onExit(s);
42
+ this.removeClasses(s, "appear"), this.removeClasses(s, "enter"), this.addClass(s, "exit", "base"), o(this.props.onExit) && this.props.onExit(s);
43
43
  }, this.onExiting = (t) => {
44
44
  const [s] = this.resolveArguments(t);
45
- this.addClass(s, "exit", "active"), this.props.onExiting && this.props.onExiting(s);
45
+ this.addClass(s, "exit", "active"), o(this.props.onExiting) && this.props.onExiting(s);
46
46
  }, this.onExited = (t) => {
47
47
  const [s] = this.resolveArguments(t);
48
- this.removeClasses(s, "exit"), this.addClass(s, "exit", "done"), this.props.onExited && this.props.onExited(s);
48
+ this.removeClasses(s, "exit"), this.addClass(s, "exit", "done"), o(this.props.onExited) && this.props.onExited(s);
49
49
  }, this.resolveArguments = (t, s) => [
50
- c(this.props.refElement) || t,
50
+ E(this.props.refElement) || t,
51
51
  s
52
52
  ], this.getClassNames = (t) => {
53
- const { classNames: s } = this.props, e = a(s), i = e && s ? `${s}-` : "", n = e ? `${i}${t}` : s[t], p = e ? `${n}-active` : s[`${t}Active`], l = e ? `${n}-done` : s[`${t}Done`];
53
+ const { classNames: s } = this.props, e = p(s), i = e && s ? `${s}-` : "", n = e ? `${i}${t}` : s[t], l = e ? `${n}-active` : s[`${t}Active`], h = e ? `${n}-done` : s[`${t}Done`];
54
54
  return {
55
55
  baseClassName: n,
56
- activeClassName: p,
57
- doneClassName: l
56
+ activeClassName: l,
57
+ doneClassName: h
58
58
  };
59
59
  };
60
60
  }
@@ -66,7 +66,7 @@ class S extends m.Component {
66
66
  addClass(t, s, e) {
67
67
  let i = this.getClassNames(s)[`${e}ClassName`];
68
68
  const { doneClassName: n } = this.getClassNames("enter");
69
- s === "appear" && e === "done" && n && (i += ` ${n}`), e === "active" && t && d(t), i && (this.appliedClasses[s][e] = i, o(t, i, "add"));
69
+ s === "appear" && e === "done" && n && (i += ` ${n}`), e === "active" && t && c(t), i && (this.appliedClasses[s][e] = i, r(t, i, "add"));
70
70
  }
71
71
  removeClasses(t, s) {
72
72
  const {
@@ -74,12 +74,12 @@ class S extends m.Component {
74
74
  active: i,
75
75
  done: n
76
76
  } = this.appliedClasses[s];
77
- this.appliedClasses[s] = {}, e && o(t, e, "remove"), i && o(t, i, "remove"), n && o(t, n, "remove");
77
+ this.appliedClasses[s] = {}, e && r(t, e, "remove"), i && r(t, i, "remove"), n && r(t, n, "remove");
78
78
  }
79
79
  render() {
80
80
  const { classNames: t, ...s } = this.props;
81
- return /* @__PURE__ */ h(
82
- E,
81
+ return /* @__PURE__ */ m(
82
+ f,
83
83
  {
84
84
  ...s,
85
85
  onEnter: this.onEnter,
@@ -93,5 +93,5 @@ class S extends m.Component {
93
93
  }
94
94
  }
95
95
  export {
96
- S as default
96
+ R as default
97
97
  };
@@ -1,4 +1,4 @@
1
- /* 2025-12-22 09:21:00 */
1
+ /* 2025-12-30 17:27:19 */
2
2
  import { isValidElement as a, cloneElement as g, Children as p } from "react";
3
3
  function h(e, t) {
4
4
  const l = (n) => t && a(n) ? t(n) : n, c = /* @__PURE__ */ Object.create(null);