@unicom-cloud/ui-common 0.1.1
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.
- package/Development.js +10 -0
- package/Empty.js +14 -0
- package/Flex.js +14 -0
- package/Progress.js +8 -0
- package/Space.js +15 -0
- package/SuspenseFallbackTest.js +7 -0
- package/TransitionGroup.js +32 -0
- package/development/index.js +48 -0
- package/empty/index.js +52 -0
- package/flex/index.js +78 -0
- package/flex/interface.js +10 -0
- package/higher-order/index.js +5 -0
- package/higher-order/with-speech-synthesis/index.js +83 -0
- package/higher-order/withSpeechSynthesis.js +11 -0
- package/hooks/create-deep-compare-effect/index.js +10 -0
- package/hooks/create-update-effect/index.js +15 -0
- package/hooks/create-use-storage-state/index.js +79 -0
- package/hooks/createDeepCompareEffect.js +7 -0
- package/hooks/createUpdateEffect.js +6 -0
- package/hooks/createUseStorageState.js +12 -0
- package/hooks/index.js +197 -0
- package/hooks/use-async-effect/index.js +26 -0
- package/hooks/use-boolean/index.js +15 -0
- package/hooks/use-click-away/index.js +32 -0
- package/hooks/use-computed-state/index.js +12 -0
- package/hooks/use-controllable-value/index.js +27 -0
- package/hooks/use-cookie-state/index.js +21 -0
- package/hooks/use-count-down/index.js +37 -0
- package/hooks/use-counter/index.js +44 -0
- package/hooks/use-create/index.js +9 -0
- package/hooks/use-creation/index.js +14 -0
- package/hooks/use-debounce/index.js +14 -0
- package/hooks/use-debounce-effect/index.js +13 -0
- package/hooks/use-debounce-fn/index.js +31 -0
- package/hooks/use-deep-compare-effect/index.js +7 -0
- package/hooks/use-deep-compare-layout-effect/index.js +7 -0
- package/hooks/use-document-visibility/index.js +20 -0
- package/hooks/use-drag/index.js +47 -0
- package/hooks/use-drop/index.js +60 -0
- package/hooks/use-event-listener/index.js +37 -0
- package/hooks/use-event-target/index.js +21 -0
- package/hooks/use-external/index.js +65 -0
- package/hooks/use-favicon/index.js +18 -0
- package/hooks/use-focus-within/index.js +26 -0
- package/hooks/use-force-update/index.js +5 -0
- package/hooks/use-fullscreen/index.js +75 -0
- package/hooks/use-get-state/index.js +10 -0
- package/hooks/use-history-travel/index.js +79 -0
- package/hooks/use-hover/index.js +26 -0
- package/hooks/use-id/index.js +11 -0
- package/hooks/use-in-view/index.js +32 -0
- package/hooks/use-in-viewport/index.js +34 -0
- package/hooks/use-infinite-scroll/index.js +83 -0
- package/hooks/use-intersection-observer/index.js +25 -0
- package/hooks/use-interval/index.js +17 -0
- package/hooks/use-is-first-render/index.js +10 -0
- package/hooks/use-isomorphic-layout-effect/index.js +7 -0
- package/hooks/use-key-press/index.js +169 -0
- package/hooks/use-keyboard-event/index.js +17 -0
- package/hooks/use-latest/index.js +9 -0
- package/hooks/use-listen-window-resize/index.js +10 -0
- package/hooks/use-local-storage-state/index.js +9 -0
- package/hooks/use-lock-fn/index.js +23 -0
- package/hooks/use-long-press/index.js +59 -0
- package/hooks/use-map/index.js +31 -0
- package/hooks/use-media/index.js +16 -0
- package/hooks/use-memoized-fn/index.js +19 -0
- package/hooks/use-merge-props/index.js +18 -0
- package/hooks/use-merge-value/index.js +21 -0
- package/hooks/use-mount/index.js +13 -0
- package/hooks/use-mouse/index.js +50 -0
- package/hooks/use-mutation-observer/index.js +23 -0
- package/hooks/use-network/index.js +57 -0
- package/hooks/use-online-status/index.js +21 -0
- package/hooks/use-overflow-hidden/index.js +27 -0
- package/hooks/use-override-ref/index.js +15 -0
- package/hooks/use-pagination/index.js +49 -0
- package/hooks/use-persist-callback/index.js +9 -0
- package/hooks/use-prefers-color-scheme-dark/index.js +25 -0
- package/hooks/use-previous/index.js +10 -0
- package/hooks/use-raf-interval/index.js +36 -0
- package/hooks/use-raf-state/index.js +16 -0
- package/hooks/use-raf-timeout/index.js +35 -0
- package/hooks/use-reactive/index.js +38 -0
- package/hooks/use-ref-latest/index.js +5 -0
- package/hooks/use-refs/index.js +11 -0
- package/hooks/use-request/index.js +7 -0
- package/hooks/use-request/src/Fetch.js +93 -0
- package/hooks/use-request/src/plugins/useAutoRunPlugin.js +30 -0
- package/hooks/use-request/src/plugins/useCachePlugin.js +66 -0
- package/hooks/use-request/src/plugins/useDebouncePlugin.js +34 -0
- package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +28 -0
- package/hooks/use-request/src/plugins/usePollingPlugin.js +37 -0
- package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +29 -0
- package/hooks/use-request/src/plugins/useRetryPlugin.js +28 -0
- package/hooks/use-request/src/plugins/useThrottlePlugin.js +31 -0
- package/hooks/use-request/src/useRequest.js +26 -0
- package/hooks/use-request/src/useRequestImplement.js +54 -0
- package/hooks/use-request/src/utils/cache.js +20 -0
- package/hooks/use-request/src/utils/cachePromise.js +10 -0
- package/hooks/use-request/src/utils/cacheSubscribe.js +11 -0
- package/hooks/use-request/src/utils/isDocumentVisible.js +8 -0
- package/hooks/use-request/src/utils/isOnline.js +8 -0
- package/hooks/use-request/src/utils/limit.js +12 -0
- package/hooks/use-request/src/utils/subscribeFocus.js +19 -0
- package/hooks/use-request/src/utils/subscribeReVisible.js +18 -0
- package/hooks/use-reset-state/index.js +18 -0
- package/hooks/use-resize-observer/index.js +5 -0
- package/hooks/use-responsive/index.js +47 -0
- package/hooks/use-safe-state/index.js +12 -0
- package/hooks/use-scroll/index.js +44 -0
- package/hooks/use-selections/index.js +58 -0
- package/hooks/use-session-storage-state/index.js +9 -0
- package/hooks/use-set/index.js +23 -0
- package/hooks/use-set-state/index.js +17 -0
- package/hooks/use-size/index.js +41 -0
- package/hooks/use-state-callback/index.js +16 -0
- package/hooks/use-state-with-promise/index.js +36 -0
- package/hooks/use-text-selection/index.js +56 -0
- package/hooks/use-theme/index.js +36 -0
- package/hooks/use-throttle/index.js +14 -0
- package/hooks/use-throttle-effect/index.js +13 -0
- package/hooks/use-throttle-fn/index.js +31 -0
- package/hooks/use-timeout/index.js +17 -0
- package/hooks/use-title/index.js +18 -0
- package/hooks/use-toggle/index.js +17 -0
- package/hooks/use-tracked-effect/index.js +12 -0
- package/hooks/use-unmount/index.js +21 -0
- package/hooks/use-unmounted-ref/index.js +11 -0
- package/hooks/use-update/index.js +9 -0
- package/hooks/use-update-effect/index.js +7 -0
- package/hooks/use-update-layout-effect/index.js +7 -0
- package/hooks/use-url-state/index.js +60 -0
- package/hooks/use-virtual-list/index.js +83 -0
- package/hooks/use-watch/index.js +14 -0
- package/hooks/use-web-socket/index.js +74 -0
- package/hooks/use-why-did-you-update/index.js +20 -0
- package/hooks/use-window-size/index.js +40 -0
- package/hooks/useAsyncEffect.js +8 -0
- package/hooks/useBoolean.js +7 -0
- package/hooks/useClickAway.js +11 -0
- package/hooks/useComputedState.js +6 -0
- package/hooks/useControllableValue.js +10 -0
- package/hooks/useCookieState.js +10 -0
- package/hooks/useCountDown.js +10 -0
- package/hooks/useCounter.js +9 -0
- package/hooks/useCreate.js +6 -0
- package/hooks/useCreation.js +7 -0
- package/hooks/useDebounce.js +7 -0
- package/hooks/useDebounceEffect.js +8 -0
- package/hooks/useDebounceFn.js +12 -0
- package/hooks/useDeepCompareEffect.js +7 -0
- package/hooks/useDeepCompareLayoutEffect.js +7 -0
- package/hooks/useDocumentVisibility.js +8 -0
- package/hooks/useDrag.js +12 -0
- package/hooks/useDrop.js +9 -0
- package/hooks/useEventListener.js +10 -0
- package/hooks/useEventTarget.js +9 -0
- package/hooks/useExternal.js +6 -0
- package/hooks/useFavicon.js +6 -0
- package/hooks/useFocusWithin.js +7 -0
- package/hooks/useForceUpdate.js +5 -0
- package/hooks/useFullscreen.js +12 -0
- package/hooks/useGetState.js +7 -0
- package/hooks/useHistoryTravel.js +9 -0
- package/hooks/useHover.js +7 -0
- package/hooks/useId.js +8 -0
- package/hooks/useInView.js +7 -0
- package/hooks/useInViewport.js +10 -0
- package/hooks/useInfiniteScroll.js +13 -0
- package/hooks/useIntersectionObserver.js +10 -0
- package/hooks/useInterval.js +9 -0
- package/hooks/useIsFirstRender.js +6 -0
- package/hooks/useIsomorphicLayoutEffect.js +7 -0
- package/hooks/useKeyPress.js +11 -0
- package/hooks/useKeyboardEvent.js +7 -0
- package/hooks/useLatest.js +6 -0
- package/hooks/useListenWindowResize.js +6 -0
- package/hooks/useLocalStorageState.js +7 -0
- package/hooks/useLockFn.js +6 -0
- package/hooks/useLongPress.js +9 -0
- package/hooks/useMap.js +7 -0
- package/hooks/useMedia.js +6 -0
- package/hooks/useMemoizedFn.js +9 -0
- package/hooks/useMergeProps.js +7 -0
- package/hooks/useMergeValue.js +9 -0
- package/hooks/useMount.js +9 -0
- package/hooks/useMouse.js +8 -0
- package/hooks/useMutationObserver.js +8 -0
- package/hooks/useNetwork.js +8 -0
- package/hooks/useOnlineStatus.js +6 -0
- package/hooks/useOverflowHidden.js +6 -0
- package/hooks/useOverrideRef.js +8 -0
- package/hooks/usePagination.js +9 -0
- package/hooks/usePersistCallback.js +6 -0
- package/hooks/usePrefersColorSchemeDark.js +7 -0
- package/hooks/usePrevious.js +6 -0
- package/hooks/useRafInterval.js +9 -0
- package/hooks/useRafState.js +7 -0
- package/hooks/useRafTimeout.js +9 -0
- package/hooks/useReactive.js +10 -0
- package/hooks/useRefLatest.js +5 -0
- package/hooks/useRefs.js +6 -0
- package/hooks/useRequest.js +7 -0
- package/hooks/useResetState.js +10 -0
- package/hooks/useResizeObserver.js +5 -0
- package/hooks/useResponsive.js +8 -0
- package/hooks/useSafeState.js +7 -0
- package/hooks/useScroll.js +9 -0
- package/hooks/useSelections.js +9 -0
- package/hooks/useSessionStorageState.js +7 -0
- package/hooks/useSet.js +7 -0
- package/hooks/useSetState.js +9 -0
- package/hooks/useSize.js +11 -0
- package/hooks/useStateCallback.js +6 -0
- package/hooks/useStateWithPromise.js +8 -0
- package/hooks/useTextSelection.js +8 -0
- package/hooks/useTheme.js +9 -0
- package/hooks/useThrottle.js +7 -0
- package/hooks/useThrottleEffect.js +8 -0
- package/hooks/useThrottleFn.js +12 -0
- package/hooks/useTimeout.js +9 -0
- package/hooks/useTitle.js +8 -0
- package/hooks/useToggle.js +6 -0
- package/hooks/useTrackedEffect.js +6 -0
- package/hooks/useUnmount.js +10 -0
- package/hooks/useUnmountedRef.js +6 -0
- package/hooks/useUpdate.js +6 -0
- package/hooks/useUpdateEffect.js +7 -0
- package/hooks/useUpdateLayoutEffect.js +7 -0
- package/hooks/useUrlState.js +12 -0
- package/hooks/useVirtualList.js +14 -0
- package/hooks/useWatch.js +9 -0
- package/hooks/useWebSocket.js +10 -0
- package/hooks/useWhyDidYouUpdate.js +6 -0
- package/hooks/useWindowSize.js +10 -0
- package/hooks/utils/createEffectWithTarget.js +23 -0
- package/hooks/utils/depsAreSame.js +12 -0
- package/hooks/utils/depsEqual.js +7 -0
- package/hooks/utils/domTarget.js +16 -0
- package/hooks/utils/getDocumentOrShadow.js +16 -0
- package/hooks/utils/index.js +5 -0
- package/hooks/utils/isAppleDevice.js +6 -0
- package/hooks/utils/isBrowser.js +6 -0
- package/hooks/utils/isDev.js +5 -0
- package/hooks/utils/rect.js +19 -0
- package/hooks/utils/useDeepCompareWithTarget.js +11 -0
- package/hooks/utils/useEffectWithTarget.js +7 -0
- package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +8 -0
- package/hooks/utils/useLayoutEffectWithTarget.js +7 -0
- package/hooks/utils.js +5 -0
- package/icons/file/index.js +59 -0
- package/icons/file.js +9 -0
- package/index.js +49 -0
- package/package.json +1 -0
- package/progress/index.js +153 -0
- package/space/index.js +77 -0
- package/style/animation.less +21 -0
- package/style/global.less +69 -0
- package/style/index.less +41 -0
- package/style/keyframes.less +48 -0
- package/style/normalize.less +0 -0
- package/style/override.less +0 -0
- package/style/style.less +2 -0
- package/style/variables.css +3 -0
- package/style/variables.less +0 -0
- package/style.css +1 -0
- package/suspense-fallback-test/index.js +17 -0
- package/transition-group/CSSTransition.js +91 -0
- package/transition-group/PqbCSSTransition.js +36 -0
- package/transition-group/ReplaceTransition.js +34 -0
- package/transition-group/SwitchTransition.js +102 -0
- package/transition-group/Transition.js +188 -0
- package/transition-group/TransitionGroup.js +50 -0
- package/transition-group/TransitionGroupContext.js +6 -0
- package/transition-group/index.js +32 -0
- package/transition-group/utils/ChildMapping.js +66 -0
- package/types/development/index.d.ts +8 -0
- package/types/development/interface.d.ts +22 -0
- package/types/empty/index.d.ts +5 -0
- package/types/empty/interface.d.ts +24 -0
- package/types/flex/index.d.ts +8 -0
- package/types/flex/interface.d.ts +73 -0
- package/types/higher-order/index.d.ts +1 -0
- package/types/higher-order/with-speech-synthesis/index.d.ts +7 -0
- package/types/higher-order/with-speech-synthesis/interface.d.ts +13 -0
- package/types/hooks/create-deep-compare-effect/index.d.ts +5 -0
- package/types/hooks/create-update-effect/index.d.ts +4 -0
- package/types/hooks/create-use-storage-state/index.d.ts +11 -0
- package/types/hooks/index.d.ts +97 -0
- package/types/hooks/use-async-effect/index.d.ts +3 -0
- package/types/hooks/use-boolean/index.d.ts +7 -0
- package/types/hooks/use-click-away/index.d.ts +4 -0
- package/types/hooks/use-computed-state/index.d.ts +4 -0
- package/types/hooks/use-controllable-value/index.d.ts +16 -0
- package/types/hooks/use-cookie-state/index.d.ts +7 -0
- package/types/hooks/use-count-down/index.d.ts +17 -0
- package/types/hooks/use-counter/index.d.ts +18 -0
- package/types/hooks/use-create/index.d.ts +2 -0
- package/types/hooks/use-creation/index.d.ts +3 -0
- package/types/hooks/use-debounce/debounceOptions.d.ts +6 -0
- package/types/hooks/use-debounce/index.d.ts +3 -0
- package/types/hooks/use-debounce-effect/index.d.ts +4 -0
- package/types/hooks/use-debounce-fn/index.d.ts +8 -0
- package/types/hooks/use-deep-compare-effect/index.d.ts +3 -0
- package/types/hooks/use-deep-compare-layout-effect/index.d.ts +3 -0
- package/types/hooks/use-document-visibility/index.d.ts +3 -0
- package/types/hooks/use-drag/index.d.ts +13 -0
- package/types/hooks/use-drop/index.d.ts +15 -0
- package/types/hooks/use-event-listener/index.d.ts +17 -0
- package/types/hooks/use-event-target/index.d.ts +14 -0
- package/types/hooks/use-external/index.d.ts +20 -0
- package/types/hooks/use-favicon/index.d.ts +2 -0
- package/types/hooks/use-focus-within/index.d.ts +7 -0
- package/types/hooks/use-force-update/index.d.ts +16 -0
- package/types/hooks/use-fullscreen/index.d.ts +17 -0
- package/types/hooks/use-get-state/index.d.ts +9 -0
- package/types/hooks/use-history-travel/index.d.ts +10 -0
- package/types/hooks/use-hover/index.d.ts +8 -0
- package/types/hooks/use-id/index.d.ts +6 -0
- package/types/hooks/use-in-view/index.d.ts +11 -0
- package/types/hooks/use-in-viewport/index.d.ts +10 -0
- package/types/hooks/use-infinite-scroll/index.d.ts +15 -0
- package/types/hooks/use-infinite-scroll/types.d.ts +32 -0
- package/types/hooks/use-intersection-observer/index.d.ts +7 -0
- package/types/hooks/use-interval/index.d.ts +4 -0
- package/types/hooks/use-is-first-render/index.d.ts +2 -0
- package/types/hooks/use-isomorphic-layout-effect/index.d.ts +3 -0
- package/types/hooks/use-key-press/index.d.ts +14 -0
- package/types/hooks/use-keyboard-event/index.d.ts +8 -0
- package/types/hooks/use-latest/index.d.ts +2 -0
- package/types/hooks/use-listen-window-resize/index.d.ts +16 -0
- package/types/hooks/use-local-storage-state/index.d.ts +2 -0
- package/types/hooks/use-lock-fn/index.d.ts +2 -0
- package/types/hooks/use-long-press/index.d.ts +13 -0
- package/types/hooks/use-map/index.d.ts +8 -0
- package/types/hooks/use-media/index.d.ts +2 -0
- package/types/hooks/use-memoized-fn/index.d.ts +4 -0
- package/types/hooks/use-merge-props/index.d.ts +5 -0
- package/types/hooks/use-merge-value/index.d.ts +6 -0
- package/types/hooks/use-mount/index.d.ts +3 -0
- package/types/hooks/use-mouse/index.d.ts +17 -0
- package/types/hooks/use-mutation-observer/index.d.ts +3 -0
- package/types/hooks/use-network/index.d.ts +12 -0
- package/types/hooks/use-online-status/index.d.ts +2 -0
- package/types/hooks/use-overflow-hidden/index.d.ts +5 -0
- package/types/hooks/use-override-ref/index.d.ts +3 -0
- package/types/hooks/use-pagination/index.d.ts +3 -0
- package/types/hooks/use-pagination/types.d.ts +29 -0
- package/types/hooks/use-persist-callback/index.d.ts +2 -0
- package/types/hooks/use-prefers-color-scheme-dark/index.d.ts +2 -0
- package/types/hooks/use-previous/index.d.ts +3 -0
- package/types/hooks/use-raf-interval/index.d.ts +4 -0
- package/types/hooks/use-raf-state/index.d.ts +7 -0
- package/types/hooks/use-raf-timeout/index.d.ts +2 -0
- package/types/hooks/use-reactive/index.d.ts +2 -0
- package/types/hooks/use-ref-latest/index.d.ts +2 -0
- package/types/hooks/use-refs/index.d.ts +2 -0
- package/types/hooks/use-request/index.d.ts +4 -0
- package/types/hooks/use-request/src/Fetch.d.ts +20 -0
- package/types/hooks/use-request/src/plugins/useAutoRunPlugin.d.ts +3 -0
- package/types/hooks/use-request/src/plugins/useCachePlugin.d.ts +3 -0
- package/types/hooks/use-request/src/plugins/useDebouncePlugin.d.ts +3 -0
- package/types/hooks/use-request/src/plugins/useLoadingDelayPlugin.d.ts +3 -0
- package/types/hooks/use-request/src/plugins/usePollingPlugin.d.ts +3 -0
- package/types/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.d.ts +3 -0
- package/types/hooks/use-request/src/plugins/useRetryPlugin.d.ts +3 -0
- package/types/hooks/use-request/src/plugins/useThrottlePlugin.d.ts +3 -0
- package/types/hooks/use-request/src/types.d.ts +73 -0
- package/types/hooks/use-request/src/useRequest.d.ts +3 -0
- package/types/hooks/use-request/src/useRequestImplement.d.ts +3 -0
- package/types/hooks/use-request/src/utils/cache.d.ts +14 -0
- package/types/hooks/use-request/src/utils/cachePromise.d.ts +4 -0
- package/types/hooks/use-request/src/utils/cacheSubscribe.d.ts +4 -0
- package/types/hooks/use-request/src/utils/isDocumentVisible.d.ts +1 -0
- package/types/hooks/use-request/src/utils/isOnline.d.ts +2 -0
- package/types/hooks/use-request/src/utils/limit.d.ts +1 -0
- package/types/hooks/use-request/src/utils/subscribeFocus.d.ts +3 -0
- package/types/hooks/use-request/src/utils/subscribeReVisible.d.ts +3 -0
- package/types/hooks/use-reset-state/index.d.ts +4 -0
- package/types/hooks/use-resize-observer/index.d.ts +2 -0
- package/types/hooks/use-responsive/index.d.ts +5 -0
- package/types/hooks/use-safe-state/index.d.ts +7 -0
- package/types/hooks/use-scroll/index.d.ts +9 -0
- package/types/hooks/use-selections/index.d.ts +21 -0
- package/types/hooks/use-session-storage-state/index.d.ts +2 -0
- package/types/hooks/use-set/index.d.ts +6 -0
- package/types/hooks/use-set-state/index.d.ts +3 -0
- package/types/hooks/use-size/index.d.ts +7 -0
- package/types/hooks/use-state-callback/index.d.ts +5 -0
- package/types/hooks/use-state-with-promise/index.d.ts +2 -0
- package/types/hooks/use-text-selection/index.d.ts +14 -0
- package/types/hooks/use-theme/index.d.ts +16 -0
- package/types/hooks/use-throttle/index.d.ts +3 -0
- package/types/hooks/use-throttle/throttleOptions.d.ts +5 -0
- package/types/hooks/use-throttle-effect/index.d.ts +4 -0
- package/types/hooks/use-throttle-fn/index.d.ts +8 -0
- package/types/hooks/use-timeout/index.d.ts +2 -0
- package/types/hooks/use-title/index.d.ts +5 -0
- package/types/hooks/use-toggle/index.d.ts +10 -0
- package/types/hooks/use-tracked-effect/index.d.ts +4 -0
- package/types/hooks/use-unmount/index.d.ts +2 -0
- package/types/hooks/use-unmounted-ref/index.d.ts +2 -0
- package/types/hooks/use-update/index.d.ts +2 -0
- package/types/hooks/use-update-effect/index.d.ts +3 -0
- package/types/hooks/use-update-layout-effect/index.d.ts +3 -0
- package/types/hooks/use-url-state/index.d.ts +10 -0
- package/types/hooks/use-virtual-list/index.d.ts +13 -0
- package/types/hooks/use-watch/index.d.ts +3 -0
- package/types/hooks/use-web-socket/index.d.ts +26 -0
- package/types/hooks/use-why-did-you-update/index.d.ts +3 -0
- package/types/hooks/use-window-size/index.d.ts +18 -0
- package/types/hooks/utils/createEffectWithTarget.d.ts +4 -0
- package/types/hooks/utils/depsAreSame.d.ts +3 -0
- package/types/hooks/utils/depsEqual.d.ts +2 -0
- package/types/hooks/utils/domTarget.d.ts +6 -0
- package/types/hooks/utils/getDocumentOrShadow.d.ts +3 -0
- package/types/hooks/utils/index.d.ts +2 -0
- package/types/hooks/utils/isAppleDevice.d.ts +2 -0
- package/types/hooks/utils/isBrowser.d.ts +2 -0
- package/types/hooks/utils/isDev.d.ts +2 -0
- package/types/hooks/utils/rect.d.ts +4 -0
- package/types/hooks/utils/useDeepCompareWithTarget.d.ts +4 -0
- package/types/hooks/utils/useEffectWithTarget.d.ts +2 -0
- package/types/hooks/utils/useIsomorphicLayoutEffectWithTarget.d.ts +2 -0
- package/types/hooks/utils/useLayoutEffectWithTarget.d.ts +2 -0
- package/types/icons/file/index.d.ts +4 -0
- package/types/icons/file/interface.d.ts +20 -0
- package/types/index.d.ts +16 -0
- package/types/progress/index.d.ts +437 -0
- package/types/space/index.d.ts +7 -0
- package/types/space/interface.d.ts +53 -0
- package/types/suspense-fallback-test/index.d.ts +7 -0
- package/types/suspense-fallback-test/interface.d.ts +1 -0
- package/types/transition-group/CSSTransition.d.ts +98 -0
- package/types/transition-group/PqbCSSTransition.d.ts +4 -0
- package/types/transition-group/ReplaceTransition.d.ts +23 -0
- package/types/transition-group/SwitchTransition.d.ts +88 -0
- package/types/transition-group/Transition.d.ts +130 -0
- package/types/transition-group/TransitionGroup.d.ts +31 -0
- package/types/transition-group/TransitionGroupContext.d.ts +3 -0
- package/types/transition-group/index.d.ts +10 -0
- package/types/transition-group/utils/ChildMapping.d.ts +27 -0
- package/types/utils/caseName.d.ts +1 -0
- package/types/utils/className.d.ts +1 -0
- package/types/utils/compute.d.ts +100 -0
- package/types/utils/constant.d.ts +3 -0
- package/types/utils/copy.d.ts +3 -0
- package/types/utils/date.d.ts +1 -0
- package/types/utils/dayjs.d.ts +3 -0
- package/types/utils/dom.d.ts +27 -0
- package/types/utils/emitter.d.ts +1 -0
- package/types/utils/fileToURL.d.ts +1 -0
- package/types/utils/fillNBSP.d.ts +3 -0
- package/types/utils/findScrollParent.d.ts +2 -0
- package/types/utils/getHighlightText.d.ts +7 -0
- package/types/utils/getHotkeyHandler.d.ts +18 -0
- package/types/utils/getStringLength.d.ts +3 -0
- package/types/utils/include.d.ts +3 -0
- package/types/utils/index.d.ts +46 -0
- package/types/utils/intersectionObserver.d.ts +3 -0
- package/types/utils/is.d.ts +10 -0
- package/types/utils/keyboardCode.d.ts +4 -0
- package/types/utils/lodash.d.ts +60 -0
- package/types/utils/math.d.ts +1 -0
- package/types/utils/mergeProps.d.ts +3 -0
- package/types/utils/mergedToString.d.ts +4 -0
- package/types/utils/mutationObserver.d.ts +3 -0
- package/types/utils/omit.d.ts +3 -0
- package/types/utils/pad.d.ts +2 -0
- package/types/utils/pick.d.ts +6 -0
- package/types/utils/pinyin.d.ts +1 -0
- package/types/utils/react19Adapter.d.ts +1 -0
- package/types/utils/reactDOM.d.ts +34 -0
- package/types/utils/resizeObserver.d.ts +3 -0
- package/types/utils/saveAs.d.ts +1 -0
- package/types/utils/screenfull.d.ts +1 -0
- package/types/utils/scrollIntoViewIfNeeded.d.ts +12 -0
- package/types/utils/setDarkTheme.d.ts +4 -0
- package/types/utils/setDir.d.ts +3 -0
- package/types/utils/setPrimaryColor.d.ts +3 -0
- package/types/utils/setTheme.d.ts +3 -0
- package/types/utils/style.d.ts +3 -0
- package/types/utils/supportRef.d.ts +3 -0
- package/types/utils/throttleByRaf.d.ts +6 -0
- package/types/utils/throttleByRaf2.d.ts +6 -0
- package/types/utils/tinycolor.d.ts +2 -0
- package/types/utils/toArray.d.ts +13 -0
- package/types/utils/tree.d.ts +1 -0
- package/types/utils/tween.d.ts +1 -0
- package/types/utils/uuid.d.ts +1 -0
- package/types/utils/validate.d.ts +1 -0
- package/types/utils/warning.d.ts +3 -0
- package/utils/caseName.js +6 -0
- package/utils/className.js +6 -0
- package/utils/compute.js +142 -0
- package/utils/constant.js +10 -0
- package/utils/copy.js +8 -0
- package/utils/date.js +2 -0
- package/utils/dayjs.js +23 -0
- package/utils/dom.js +63 -0
- package/utils/emitter.js +6 -0
- package/utils/fileToURL.js +6 -0
- package/utils/fillNBSP.js +10 -0
- package/utils/findScrollParent.js +18 -0
- package/utils/getHighlightText.js +45 -0
- package/utils/getHotkeyHandler.js +29 -0
- package/utils/getStringLength.js +11 -0
- package/utils/include.js +11 -0
- package/utils/index.js +334 -0
- package/utils/intersectionObserver.js +23 -0
- package/utils/is.js +98 -0
- package/utils/keyboardCode.js +7 -0
- package/utils/lodash.js +121 -0
- package/utils/math.js +10 -0
- package/utils/mergeProps.js +13 -0
- package/utils/mergedToString.js +16 -0
- package/utils/mutationObserver.js +21 -0
- package/utils/omit.js +13 -0
- package/utils/pad.js +19 -0
- package/utils/pick.js +19 -0
- package/utils/pinyin.js +6 -0
- package/utils/react19Adapter.js +4 -0
- package/utils/reactDOM.js +87 -0
- package/utils/resizeObserver.js +33 -0
- package/utils/saveAs.js +6 -0
- package/utils/screenfull.js +6 -0
- package/utils/scrollIntoViewIfNeeded.js +75 -0
- package/utils/setDarkTheme.js +28 -0
- package/utils/setDir.js +14 -0
- package/utils/setPrimaryColor.js +31 -0
- package/utils/setTheme.js +56 -0
- package/utils/style.js +40 -0
- package/utils/supportRef.js +10 -0
- package/utils/throttleByRaf.js +17 -0
- package/utils/throttleByRaf2.js +9 -0
- package/utils/tinycolor.js +7 -0
- package/utils/toArray.js +15 -0
- package/utils/tree.js +14 -0
- package/utils/tween.js +7 -0
- package/utils/uuid.js +6 -0
- package/utils/validate.js +18 -0
- package/utils/warning.js +12 -0
package/style/index.less
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@import './variables.css';
|
|
2
|
+
|
|
3
|
+
@import './keyframes.less';
|
|
4
|
+
@import './animation.less';
|
|
5
|
+
@import './variables.less';
|
|
6
|
+
@import './normalize.less';
|
|
7
|
+
@import './global.less';
|
|
8
|
+
@import './override.less';
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
// color-scheme: light dark;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.@{ui-pc-theme-dark-class-name},
|
|
15
|
+
.@{ui-mobile-theme-dark-class-name} {
|
|
16
|
+
color-scheme: dark;
|
|
17
|
+
* {
|
|
18
|
+
color-scheme: dark;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
* {
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[dir='rtl'] {
|
|
26
|
+
* {
|
|
27
|
+
direction: rtl;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// @media (prefers-color-scheme: dark) {
|
|
32
|
+
// * {
|
|
33
|
+
// color-scheme: dark;
|
|
34
|
+
// }
|
|
35
|
+
// }
|
|
36
|
+
|
|
37
|
+
// @media (prefers-color-scheme: light) {
|
|
38
|
+
// * {
|
|
39
|
+
// color-scheme: light;
|
|
40
|
+
// }
|
|
41
|
+
// }
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@keyframes ~'@{ui-common-prefix}-keyframes-vibrate' {
|
|
2
|
+
0% {
|
|
3
|
+
transform: translate(0);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
20% {
|
|
7
|
+
transform: translate(-2px, 2px);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
40% {
|
|
11
|
+
transform: translate(-2px, -2px);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
60% {
|
|
15
|
+
transform: translate(2px, 2px);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
80% {
|
|
19
|
+
transform: translate(2px, -2px);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
100% {
|
|
23
|
+
transform: translate(0);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes ~'@{ui-common-prefix}-keyframes-rotate-360deg' {
|
|
28
|
+
from {
|
|
29
|
+
transform: rotate(0deg);
|
|
30
|
+
}
|
|
31
|
+
to {
|
|
32
|
+
transform: rotate(360deg);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes ~'@{ui-common-prefix}-keyframes-blink' {
|
|
37
|
+
0% {
|
|
38
|
+
opacity: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
50% {
|
|
42
|
+
opacity: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
100% {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
File without changes
|
|
File without changes
|
package/style/style.less
ADDED
|
File without changes
|
package/style.css
ADDED
|
@@ -0,0 +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:var(--pqbc-color-neutral-6, var(--pqb-color-neutral-6, var(--pqbm-color-neutral-6, #868788)))}.pqbc-space{display:inline-flex;flex-wrap:nowrap}.pqbc-space-vertical{flex-direction:column;width:100%}.pqbc-space-align-items-baseline{align-items:baseline}.pqbc-space-align-items-start{align-items:flex-start}.pqbc-space-align-items-end{align-items:flex-end}.pqbc-space-align-items-center{align-items:center}.pqbc-space-justify-content-baseline{justify-content:baseline}.pqbc-space-justify-content-start{justify-content:flex-start}.pqbc-space-justify-content-end{justify-content:flex-end}.pqbc-space-justify-content-center{justify-content:center}.pqbc-space-justify-content-space-between{justify-content:space-between}.pqbc-space-wrap{flex-wrap:wrap}.pqbc-space-rtl{direction:rtl}.pqbc-icons-file{position:relative}.pqbc-icons-file-svg{width:30px;height:30px}.pqbc-icons-file-svg-bg{fill:rgb(var(--pqb-primary-6, --pqbm-primary-6, 20, 118, 241))}.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{--pqb-primary: 26, 94, 255;background-color:rgb(var(--pqb-primary-6, --pqbm-primary-6, --pqbc-primary-6, --pqb-primary));position:fixed;z-index:870227;top:0;left:0;width:100%;height:2px}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import e from "react";
|
|
4
|
+
const a = (n, r) => {
|
|
5
|
+
const s = e.useMemo(
|
|
6
|
+
() => e.lazy(
|
|
7
|
+
() => new Promise(() => {
|
|
8
|
+
})
|
|
9
|
+
),
|
|
10
|
+
[]
|
|
11
|
+
);
|
|
12
|
+
return /* @__PURE__ */ o(s, {});
|
|
13
|
+
}, t = e.forwardRef(a);
|
|
14
|
+
t.displayName = "SuspenseFallbackTest";
|
|
15
|
+
export {
|
|
16
|
+
t as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import d from "react";
|
|
4
|
+
import c from "@unicom-cloud/utils/dom-helpers/reflow";
|
|
5
|
+
import "../utils/is.js";
|
|
6
|
+
import m from "./Transition.js";
|
|
7
|
+
import { isString as a } from "@unicom-cloud/utils/is";
|
|
8
|
+
function n(r, s, t = "add") {
|
|
9
|
+
r instanceof Element && s && a(s) && s.split(" ").filter(Boolean).forEach((e, i, o) => {
|
|
10
|
+
r.classList[t](e);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
class u extends d.Component {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.refElement = void 0, this.appliedClasses = {
|
|
16
|
+
appear: {},
|
|
17
|
+
enter: {},
|
|
18
|
+
exit: {}
|
|
19
|
+
}, this.onEnter = (s, t) => {
|
|
20
|
+
const [e, i] = this.resolveArguments(
|
|
21
|
+
s,
|
|
22
|
+
t
|
|
23
|
+
);
|
|
24
|
+
this.removeClasses(e, "exit"), this.addClass(e, i ? "appear" : "enter", "base"), this.props.onEnter && this.props.onEnter(s, t);
|
|
25
|
+
}, this.onEntering = (s, t) => {
|
|
26
|
+
const [e, i] = this.resolveArguments(
|
|
27
|
+
s,
|
|
28
|
+
t
|
|
29
|
+
), o = i ? "appear" : "enter";
|
|
30
|
+
this.addClass(e, o, "active"), this.props.onEntering && this.props.onEntering(s, t);
|
|
31
|
+
}, this.onEntered = (s, t) => {
|
|
32
|
+
const [e, i] = this.resolveArguments(
|
|
33
|
+
s,
|
|
34
|
+
t
|
|
35
|
+
), o = i ? "appear" : "enter";
|
|
36
|
+
this.removeClasses(e, o), this.addClass(e, o, "done"), this.props.onEntered && this.props.onEntered(s, t);
|
|
37
|
+
}, this.onExit = (s) => {
|
|
38
|
+
const [t] = this.resolveArguments(s);
|
|
39
|
+
this.removeClasses(t, "appear"), this.removeClasses(t, "enter"), this.addClass(t, "exit", "base"), this.props.onExit && this.props.onExit(s);
|
|
40
|
+
}, this.onExiting = (s) => {
|
|
41
|
+
const [t] = this.resolveArguments(s);
|
|
42
|
+
this.addClass(t, "exit", "active"), this.props.onExiting && this.props.onExiting(s);
|
|
43
|
+
}, this.onExited = (s) => {
|
|
44
|
+
const [t] = this.resolveArguments(s);
|
|
45
|
+
this.removeClasses(t, "exit"), this.addClass(t, "exit", "done"), this.props.onExited && this.props.onExited(s);
|
|
46
|
+
}, this.resolveArguments = (s, t) => this.props.refElement ? [this.props.refElement.current, s] : [s, t], this.getClassNames = (s) => {
|
|
47
|
+
const { classNames: t } = this.props, e = a(t), i = e && t ? `${t}-` : "", o = e ? `${i}${s}` : t[s], p = e ? `${o}-active` : t[`${s}Active`], h = e ? `${o}-done` : t[`${s}Done`];
|
|
48
|
+
return {
|
|
49
|
+
baseClassName: o,
|
|
50
|
+
activeClassName: p,
|
|
51
|
+
doneClassName: h
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static {
|
|
56
|
+
this.defaultProps = {
|
|
57
|
+
classNames: ""
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
addClass(s, t, e) {
|
|
61
|
+
let i = this.getClassNames(t)[`${e}ClassName`];
|
|
62
|
+
const { doneClassName: o } = this.getClassNames("enter");
|
|
63
|
+
t === "appear" && e === "done" && o && (i += ` ${o}`), e === "active" && s && c(s), i && (this.appliedClasses[t][e] = i, n(s, i, "add"));
|
|
64
|
+
}
|
|
65
|
+
removeClasses(s, t) {
|
|
66
|
+
const {
|
|
67
|
+
base: e,
|
|
68
|
+
active: i,
|
|
69
|
+
done: o
|
|
70
|
+
} = this.appliedClasses[t];
|
|
71
|
+
this.appliedClasses[t] = {}, e && n(s, e, "remove"), i && n(s, i, "remove"), o && n(s, o, "remove");
|
|
72
|
+
}
|
|
73
|
+
render() {
|
|
74
|
+
const { classNames: s, ...t } = this.props;
|
|
75
|
+
return /* @__PURE__ */ l(
|
|
76
|
+
m,
|
|
77
|
+
{
|
|
78
|
+
...t,
|
|
79
|
+
onEnter: this.onEnter,
|
|
80
|
+
onEntered: this.onEntered,
|
|
81
|
+
onEntering: this.onEntering,
|
|
82
|
+
onExit: this.onExit,
|
|
83
|
+
onExiting: this.onExiting,
|
|
84
|
+
onExited: this.onExited
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
u as default
|
|
91
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as f, useMemo as u, isValidElement as E, cloneElement as d } from "react";
|
|
4
|
+
import { findDOMNode as a, callbackOriginRef as s } from "../utils/reactDOM.js";
|
|
5
|
+
import { supportRef as x } from "../utils/supportRef.js";
|
|
6
|
+
import g from "./CSSTransition.js";
|
|
7
|
+
function M(n) {
|
|
8
|
+
const { children: e, ...o } = n, i = f(void 0), t = f(void 0), m = u(() => n.refElement === void 0 && x(e) && E(e) ? (t.current = !0, d(e, {
|
|
9
|
+
ref(r) {
|
|
10
|
+
i.current = a(r), s(e, r);
|
|
11
|
+
}
|
|
12
|
+
})) : (t.current = !1, e), [e, n.refElement]);
|
|
13
|
+
return t.current && [
|
|
14
|
+
"onEnter",
|
|
15
|
+
"onEntering",
|
|
16
|
+
"onEntered",
|
|
17
|
+
"onExit",
|
|
18
|
+
"onExiting",
|
|
19
|
+
"onExited"
|
|
20
|
+
].forEach((r) => {
|
|
21
|
+
n[r] && (o[r] = (v, ...c) => {
|
|
22
|
+
n[r](i.current, ...c);
|
|
23
|
+
});
|
|
24
|
+
}), /* @__PURE__ */ l(
|
|
25
|
+
g,
|
|
26
|
+
{
|
|
27
|
+
...o,
|
|
28
|
+
refElement: t.current ? i : void 0,
|
|
29
|
+
children: m
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
M as PqbCSSTransition,
|
|
35
|
+
M as default
|
|
36
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import i from "react";
|
|
4
|
+
import h from "react-dom";
|
|
5
|
+
import l from "./TransitionGroup.js";
|
|
6
|
+
class m extends i.Component {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments), this.handleEnter = (...e) => this.handleLifecycle("onEnter", 0, e), this.handleEntering = (...e) => this.handleLifecycle("onEntering", 0, e), this.handleEntered = (...e) => this.handleLifecycle("onEntered", 0, e), this.handleExit = (...e) => this.handleLifecycle("onExit", 1, e), this.handleExiting = (...e) => this.handleLifecycle("onExiting", 1, e), this.handleExited = (...e) => this.handleLifecycle("onExited", 1, e);
|
|
9
|
+
}
|
|
10
|
+
handleLifecycle(e, o, n) {
|
|
11
|
+
const { children: r } = this.props, t = i.Children.toArray(r)[o];
|
|
12
|
+
if (t.props[e] && t.props[e](...n), this.props[e]) {
|
|
13
|
+
const s = t.props.refElement ? void 0 : h.findDOMNode?.(this);
|
|
14
|
+
this.props[e](s);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
const { children: e, in: o, ...n } = this.props, [r, t] = i.Children.toArray(e);
|
|
19
|
+
return delete n.onEnter, delete n.onEntering, delete n.onEntered, delete n.onExit, delete n.onExiting, delete n.onExited, /* @__PURE__ */ d(l, { ...n, children: o ? i.cloneElement(r, {
|
|
20
|
+
key: "first",
|
|
21
|
+
onEnter: this.handleEnter,
|
|
22
|
+
onEntering: this.handleEntering,
|
|
23
|
+
onEntered: this.handleEntered
|
|
24
|
+
}) : i.cloneElement(t, {
|
|
25
|
+
key: "second",
|
|
26
|
+
onEnter: this.handleExit,
|
|
27
|
+
onEntering: this.handleExiting,
|
|
28
|
+
onEntered: this.handleExited
|
|
29
|
+
}) });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
m as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import r from "react";
|
|
4
|
+
import { ENTERED as a, ENTERING as s, EXITING as E } from "./Transition.js";
|
|
5
|
+
import f from "./TransitionGroupContext.js";
|
|
6
|
+
function p(t, e) {
|
|
7
|
+
return !(t === e || r.isValidElement(t) && r.isValidElement(e) && t.key != null && t.key === e.key);
|
|
8
|
+
}
|
|
9
|
+
const o = {
|
|
10
|
+
out: "out-in",
|
|
11
|
+
in: "in-out"
|
|
12
|
+
}, c = (t, e, n) => (...i) => {
|
|
13
|
+
t.props[e] && t.props[e](...i), n();
|
|
14
|
+
}, h = {
|
|
15
|
+
[o.out]: ({ current: t, changeState: e }) => r.cloneElement(t, {
|
|
16
|
+
in: !1,
|
|
17
|
+
onExited: c(t, "onExited", () => {
|
|
18
|
+
e(s, null);
|
|
19
|
+
})
|
|
20
|
+
}),
|
|
21
|
+
[o.in]: ({ current: t, changeState: e, children: n }) => [
|
|
22
|
+
t,
|
|
23
|
+
r.cloneElement(n, {
|
|
24
|
+
in: !0,
|
|
25
|
+
onEntered: c(n, "onEntered", () => {
|
|
26
|
+
e(s);
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
}, x = {
|
|
31
|
+
[o.out]: ({ children: t, changeState: e }) => r.cloneElement(t, {
|
|
32
|
+
in: !0,
|
|
33
|
+
onEntered: c(t, "onEntered", () => {
|
|
34
|
+
e(a, r.cloneElement(t, { in: !0 }));
|
|
35
|
+
})
|
|
36
|
+
}),
|
|
37
|
+
[o.in]: ({ current: t, children: e, changeState: n }) => [
|
|
38
|
+
r.cloneElement(t, {
|
|
39
|
+
in: !1,
|
|
40
|
+
onExited: c(t, "onExited", () => {
|
|
41
|
+
n(a, r.cloneElement(e, { in: !0 }));
|
|
42
|
+
})
|
|
43
|
+
}),
|
|
44
|
+
r.cloneElement(e, {
|
|
45
|
+
in: !0
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
};
|
|
49
|
+
class g extends r.Component {
|
|
50
|
+
constructor() {
|
|
51
|
+
super(...arguments), this.state = {
|
|
52
|
+
status: a,
|
|
53
|
+
current: null
|
|
54
|
+
}, this.appeared = !1, this.changeState = (e, n = this.state.current) => {
|
|
55
|
+
this.setState({
|
|
56
|
+
status: e,
|
|
57
|
+
current: n
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
componentDidMount() {
|
|
62
|
+
this.appeared = !0;
|
|
63
|
+
}
|
|
64
|
+
static getDerivedStateFromProps(e, n) {
|
|
65
|
+
return e.children == null ? {
|
|
66
|
+
current: null
|
|
67
|
+
} : n.status === s && e.mode === o.in ? {
|
|
68
|
+
status: s
|
|
69
|
+
} : n.current && p(n.current, e.children) ? {
|
|
70
|
+
status: E
|
|
71
|
+
} : {
|
|
72
|
+
current: r.cloneElement(e.children, {
|
|
73
|
+
in: !0
|
|
74
|
+
})
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
render() {
|
|
78
|
+
const {
|
|
79
|
+
props: { children: e, mode: n },
|
|
80
|
+
state: { status: i, current: l }
|
|
81
|
+
} = this, m = { children: e, current: l, changeState: this.changeState, status: i };
|
|
82
|
+
let u;
|
|
83
|
+
switch (i) {
|
|
84
|
+
case s:
|
|
85
|
+
u = x[n](m);
|
|
86
|
+
break;
|
|
87
|
+
case E:
|
|
88
|
+
u = h[n](m);
|
|
89
|
+
break;
|
|
90
|
+
case a:
|
|
91
|
+
u = l;
|
|
92
|
+
}
|
|
93
|
+
return /* @__PURE__ */ d(f.Provider, { value: { isMounting: !this.appeared }, children: u });
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
g.defaultProps = {
|
|
97
|
+
mode: o.out
|
|
98
|
+
};
|
|
99
|
+
export {
|
|
100
|
+
g as default,
|
|
101
|
+
o as modes
|
|
102
|
+
};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { jsx as N } from "react/jsx-runtime";
|
|
3
|
+
import c from "react";
|
|
4
|
+
import h from "react-dom";
|
|
5
|
+
import S from "@unicom-cloud/utils/dom-helpers/reflow";
|
|
6
|
+
import "../utils/is.js";
|
|
7
|
+
import x from "./TransitionGroupContext.js";
|
|
8
|
+
import { isFunction as b } from "@unicom-cloud/utils/is";
|
|
9
|
+
const E = "unmounted", o = "exited", r = "entering", l = "entered", f = "exiting";
|
|
10
|
+
class p extends c.Component {
|
|
11
|
+
constructor(t, e) {
|
|
12
|
+
super(t, e), this.refElement = void 0;
|
|
13
|
+
const n = e, s = n && !n.isMounting ? t.enter : t.appear;
|
|
14
|
+
let i;
|
|
15
|
+
this.appearStatus = null, t.in ? s ? (i = o, this.appearStatus = r) : i = l : t.unmountOnExit || t.mountOnEnter ? i = E : i = o, this.state = { status: i }, this.nextCallback = null;
|
|
16
|
+
}
|
|
17
|
+
static {
|
|
18
|
+
this.contextType = x;
|
|
19
|
+
}
|
|
20
|
+
static getDerivedStateFromProps({ in: t }, e) {
|
|
21
|
+
return t && e.status === E ? { status: o } : null;
|
|
22
|
+
}
|
|
23
|
+
// getSnapshotBeforeUpdate(prevProps) {
|
|
24
|
+
// let nextStatus = null
|
|
25
|
+
// if (prevProps !== this.props) {
|
|
26
|
+
// const { status } = this.state
|
|
27
|
+
// if (this.props.in) {
|
|
28
|
+
// if (status !== ENTERING && status !== ENTERED) {
|
|
29
|
+
// nextStatus = ENTERING
|
|
30
|
+
// }
|
|
31
|
+
// } else {
|
|
32
|
+
// if (status === ENTERING || status === ENTERED) {
|
|
33
|
+
// nextStatus = EXITING
|
|
34
|
+
// }
|
|
35
|
+
// }
|
|
36
|
+
// }
|
|
37
|
+
// return { nextStatus }
|
|
38
|
+
// }
|
|
39
|
+
componentDidMount() {
|
|
40
|
+
this.updateStatus(!0, this.appearStatus);
|
|
41
|
+
}
|
|
42
|
+
componentDidUpdate(t) {
|
|
43
|
+
let e = null;
|
|
44
|
+
if (t !== this.props) {
|
|
45
|
+
const { status: n } = this.state;
|
|
46
|
+
this.props.in ? n !== r && n !== l && (e = r) : (n === r || n === l) && (e = f);
|
|
47
|
+
}
|
|
48
|
+
this.updateStatus(!1, e);
|
|
49
|
+
}
|
|
50
|
+
componentWillUnmount() {
|
|
51
|
+
this.cancelNextCallback();
|
|
52
|
+
}
|
|
53
|
+
getTimeouts() {
|
|
54
|
+
const { timeout: t } = this.props;
|
|
55
|
+
let e, n, s;
|
|
56
|
+
return e = n = s = t, t != null && typeof t != "number" && (e = t.exit, n = t.enter, s = t.appear !== void 0 ? t.appear : n), { exit: e, enter: n, appear: s };
|
|
57
|
+
}
|
|
58
|
+
updateStatus(t = !1, e) {
|
|
59
|
+
if (e !== null)
|
|
60
|
+
if (this.cancelNextCallback(), e === r) {
|
|
61
|
+
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
62
|
+
const n = this.props.refElement ? this.props.refElement.current : h.findDOMNode?.(this);
|
|
63
|
+
n && S(n);
|
|
64
|
+
}
|
|
65
|
+
this.performEnter(t);
|
|
66
|
+
} else
|
|
67
|
+
this.performExit();
|
|
68
|
+
else this.props.unmountOnExit && this.state.status === o && this.setState({ status: E });
|
|
69
|
+
}
|
|
70
|
+
performEnter(t) {
|
|
71
|
+
const { enter: e } = this.props, n = this.context ? this.context.isMounting : t, [s, i] = this.props.refElement ? [n] : [h.findDOMNode?.(this), n], u = this.getTimeouts(), m = n ? u.appear : u.enter;
|
|
72
|
+
if (!t && !e) {
|
|
73
|
+
this.safeSetState({ status: l }, () => {
|
|
74
|
+
this.props.onEntered(s);
|
|
75
|
+
});
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
this.props.onEnter(s, i), this.safeSetState({ status: r }, () => {
|
|
79
|
+
this.props.onEntering(s, i), this.onTransitionEnd(m, () => {
|
|
80
|
+
this.safeSetState({ status: l }, () => {
|
|
81
|
+
this.props.onEntered(s, i);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
performExit() {
|
|
87
|
+
const { exit: t } = this.props, e = this.getTimeouts(), n = this.props.refElement ? void 0 : h.findDOMNode?.(this);
|
|
88
|
+
if (!t) {
|
|
89
|
+
this.safeSetState({ status: o }, () => {
|
|
90
|
+
this.props.onExited(n);
|
|
91
|
+
});
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
this.props.onExit(n), this.safeSetState({ status: f }, () => {
|
|
95
|
+
this.props.onExiting(n), this.onTransitionEnd(e.exit, () => {
|
|
96
|
+
this.safeSetState({ status: o }, () => {
|
|
97
|
+
this.props.onExited(n);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
cancelNextCallback() {
|
|
103
|
+
this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
|
|
104
|
+
}
|
|
105
|
+
safeSetState(t, e) {
|
|
106
|
+
e = this.setNextCallback(e), this.setState(t, e);
|
|
107
|
+
}
|
|
108
|
+
setNextCallback(t) {
|
|
109
|
+
let e = !0;
|
|
110
|
+
return this.nextCallback = (n) => {
|
|
111
|
+
e && (e = !1, this.nextCallback = null, t(n));
|
|
112
|
+
}, this.nextCallback.cancel = () => {
|
|
113
|
+
e = !1;
|
|
114
|
+
}, this.nextCallback;
|
|
115
|
+
}
|
|
116
|
+
onTransitionEnd(t, e) {
|
|
117
|
+
this.setNextCallback(e);
|
|
118
|
+
const n = this.props.refElement ? this.props.refElement.current : h.findDOMNode?.(this), s = t == null && !this.props.addEndListener;
|
|
119
|
+
if (!n || s) {
|
|
120
|
+
setTimeout(this.nextCallback, 0);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (this.props.addEndListener) {
|
|
124
|
+
const [i, u] = this.props.refElement ? [this.nextCallback] : [n, this.nextCallback];
|
|
125
|
+
this.props.addEndListener(i, u);
|
|
126
|
+
}
|
|
127
|
+
t != null && setTimeout(this.nextCallback, t);
|
|
128
|
+
}
|
|
129
|
+
render() {
|
|
130
|
+
const t = this.state.status;
|
|
131
|
+
if (t === E)
|
|
132
|
+
return null;
|
|
133
|
+
const {
|
|
134
|
+
children: e,
|
|
135
|
+
// filter props for `Transition`
|
|
136
|
+
in: n,
|
|
137
|
+
mountOnEnter: s,
|
|
138
|
+
unmountOnExit: i,
|
|
139
|
+
appear: u,
|
|
140
|
+
enter: m,
|
|
141
|
+
exit: C,
|
|
142
|
+
timeout: O,
|
|
143
|
+
addEndListener: g,
|
|
144
|
+
onEnter: k,
|
|
145
|
+
onEntering: _,
|
|
146
|
+
onEntered: D,
|
|
147
|
+
onExit: M,
|
|
148
|
+
onExiting: v,
|
|
149
|
+
onExited: y,
|
|
150
|
+
refElement: I,
|
|
151
|
+
...d
|
|
152
|
+
} = this.props;
|
|
153
|
+
return (
|
|
154
|
+
// allows for nested Transitions
|
|
155
|
+
/* @__PURE__ */ N(x.Provider, { value: null, children: b(e) ? e(t, d) : c.cloneElement(c.Children.only(e), d) })
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function a() {
|
|
160
|
+
}
|
|
161
|
+
p.defaultProps = {
|
|
162
|
+
in: !1,
|
|
163
|
+
mountOnEnter: !1,
|
|
164
|
+
unmountOnExit: !1,
|
|
165
|
+
appear: !1,
|
|
166
|
+
enter: !0,
|
|
167
|
+
exit: !0,
|
|
168
|
+
refElement: void 0,
|
|
169
|
+
onEnter: a,
|
|
170
|
+
onEntering: a,
|
|
171
|
+
onEntered: a,
|
|
172
|
+
onExit: a,
|
|
173
|
+
onExiting: a,
|
|
174
|
+
onExited: a
|
|
175
|
+
};
|
|
176
|
+
p.UNMOUNTED = E;
|
|
177
|
+
p.EXITED = o;
|
|
178
|
+
p.ENTERING = r;
|
|
179
|
+
p.ENTERED = l;
|
|
180
|
+
p.EXITING = f;
|
|
181
|
+
export {
|
|
182
|
+
l as ENTERED,
|
|
183
|
+
r as ENTERING,
|
|
184
|
+
o as EXITED,
|
|
185
|
+
f as EXITING,
|
|
186
|
+
E as UNMOUNTED,
|
|
187
|
+
p as default
|
|
188
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import p from "react";
|
|
4
|
+
import d from "./TransitionGroupContext.js";
|
|
5
|
+
import { getInitialChildMapping as a, getNextChildMapping as l, getChildMapping as c } from "./utils/ChildMapping.js";
|
|
6
|
+
const u = {
|
|
7
|
+
component: "div",
|
|
8
|
+
childFactory: (s) => s
|
|
9
|
+
};
|
|
10
|
+
class h extends p.Component {
|
|
11
|
+
constructor(t, n) {
|
|
12
|
+
super(t, n);
|
|
13
|
+
const e = this.handleExited.bind(this);
|
|
14
|
+
this.state = {
|
|
15
|
+
contextValue: { isMounting: !0 },
|
|
16
|
+
handleExited: e,
|
|
17
|
+
firstRender: !0
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
componentDidMount() {
|
|
21
|
+
this.mounted = !0, this.setState({
|
|
22
|
+
contextValue: { isMounting: !1 }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
componentWillUnmount() {
|
|
26
|
+
this.mounted = !1;
|
|
27
|
+
}
|
|
28
|
+
static getDerivedStateFromProps(t, { children: n, handleExited: e, firstRender: r }) {
|
|
29
|
+
return {
|
|
30
|
+
children: r ? a(t, e) : l(t, n, e),
|
|
31
|
+
firstRender: !1
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
// element is `undefined` when user provided `refElement` prop
|
|
35
|
+
handleExited(t, n) {
|
|
36
|
+
const e = c(this.props.children);
|
|
37
|
+
t.key in e || (t.props.onExited && t.props.onExited(n), this.mounted && this.setState((r) => {
|
|
38
|
+
const i = { ...r.children };
|
|
39
|
+
return delete i[t.key], { children: i };
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
const { component: t, childFactory: n, ...e } = this.props, { contextValue: r } = this.state, i = Object.values(this.state.children).map(n);
|
|
44
|
+
return delete e.appear, delete e.enter, delete e.exit, t === null ? /* @__PURE__ */ o(d.Provider, { value: r, children: i }) : /* @__PURE__ */ o(d.Provider, { value: r, children: /* @__PURE__ */ o(t, { ...e, children: i }) });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
h.defaultProps = u;
|
|
48
|
+
export {
|
|
49
|
+
h as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { default as o } from "@unicom-cloud/utils/dom-helpers/reflow";
|
|
3
|
+
import "../utils/is.js";
|
|
4
|
+
import { default as n } from "./CSSTransition.js";
|
|
5
|
+
import { PqbCSSTransition as p } from "./PqbCSSTransition.js";
|
|
6
|
+
import { default as T } from "./ReplaceTransition.js";
|
|
7
|
+
import { default as l, modes as I } from "./SwitchTransition.js";
|
|
8
|
+
import { ENTERED as f, ENTERING as E, EXITED as u, EXITING as G, UNMOUNTED as g, default as m } from "./Transition.js";
|
|
9
|
+
import { default as M, default as C } from "./TransitionGroup.js";
|
|
10
|
+
import { default as S } from "./TransitionGroupContext.js";
|
|
11
|
+
import { getChildMapping as O, getInitialChildMapping as D, getNextChildMapping as A, mergeChildMappings as _ } from "./utils/ChildMapping.js";
|
|
12
|
+
export {
|
|
13
|
+
n as CSSTransition,
|
|
14
|
+
p as PqbCSSTransition,
|
|
15
|
+
T as ReplaceTransition,
|
|
16
|
+
l as SwitchTransition,
|
|
17
|
+
I as SwitchTransitionModes,
|
|
18
|
+
f as TRANSITION_ENTERED,
|
|
19
|
+
E as TRANSITION_ENTERING,
|
|
20
|
+
u as TRANSITION_EXITED,
|
|
21
|
+
G as TRANSITION_EXITING,
|
|
22
|
+
g as TRANSITION_UNMOUNTED,
|
|
23
|
+
m as Transition,
|
|
24
|
+
M as TransitionGroup,
|
|
25
|
+
S as TransitionGroupContext,
|
|
26
|
+
o as TransitionGroupForceReflow,
|
|
27
|
+
O as TransitionGroupGetChildMapping,
|
|
28
|
+
D as TransitionGroupGetInitialChildMapping,
|
|
29
|
+
A as TransitionGroupGetNextChildMapping,
|
|
30
|
+
_ as TransitionGroupMergeChildMappings,
|
|
31
|
+
C as default
|
|
32
|
+
};
|