@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
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
export default Progress;
|
|
2
|
+
declare namespace Progress {
|
|
3
|
+
let status: null;
|
|
4
|
+
namespace settings {
|
|
5
|
+
let parent: HTMLElement;
|
|
6
|
+
let progress: HTMLDivElement;
|
|
7
|
+
let bar: HTMLDivElement;
|
|
8
|
+
let minimum: number;
|
|
9
|
+
let easing: string;
|
|
10
|
+
let positionUsing: string;
|
|
11
|
+
let speed: number;
|
|
12
|
+
let trickle: boolean;
|
|
13
|
+
let trickleSpeed: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Updates configuration.
|
|
17
|
+
*
|
|
18
|
+
* Progress.configure({
|
|
19
|
+
* minimum: 0.1
|
|
20
|
+
* });
|
|
21
|
+
*/
|
|
22
|
+
function configure(options: any): {
|
|
23
|
+
status: null;
|
|
24
|
+
settings: {
|
|
25
|
+
parent: HTMLElement;
|
|
26
|
+
progress: HTMLDivElement;
|
|
27
|
+
bar: HTMLDivElement;
|
|
28
|
+
minimum: number;
|
|
29
|
+
easing: string;
|
|
30
|
+
positionUsing: string;
|
|
31
|
+
speed: number;
|
|
32
|
+
trickle: boolean;
|
|
33
|
+
trickleSpeed: number;
|
|
34
|
+
};
|
|
35
|
+
configure(options: any): /*elided*/ any;
|
|
36
|
+
/**
|
|
37
|
+
* Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
|
|
38
|
+
*
|
|
39
|
+
* Progress.set(0.4);
|
|
40
|
+
* Progress.set(1.0);
|
|
41
|
+
*/
|
|
42
|
+
set(n: any): /*elided*/ any;
|
|
43
|
+
isStarted(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Shows the progress bar.
|
|
46
|
+
* This is the same as setting the status to 0%, except that it doesn't go backwards.
|
|
47
|
+
*
|
|
48
|
+
* Progress.start();
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
start(): /*elided*/ any;
|
|
52
|
+
/**
|
|
53
|
+
* Hides the progress bar.
|
|
54
|
+
* This is the *sort of* the same as setting the status to 100%, with the
|
|
55
|
+
* difference being `done()` makes some placebo effect of some realistic motion.
|
|
56
|
+
*
|
|
57
|
+
* Progress.done();
|
|
58
|
+
*
|
|
59
|
+
* If `true` is passed, it will show the progress bar even if its hidden.
|
|
60
|
+
*
|
|
61
|
+
* Progress.done(true);
|
|
62
|
+
*/
|
|
63
|
+
done(force: any): /*elided*/ any;
|
|
64
|
+
/**
|
|
65
|
+
* Increments by a random amount.
|
|
66
|
+
*/
|
|
67
|
+
inc(amount: any): /*elided*/ any | undefined;
|
|
68
|
+
trickle(): /*elided*/ any | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* (Internal) renders the progress bar markup based on the `template`
|
|
71
|
+
* setting.
|
|
72
|
+
*/
|
|
73
|
+
render(fromStart: any): HTMLDivElement;
|
|
74
|
+
/**
|
|
75
|
+
* Removes the element. Opposite of render().
|
|
76
|
+
*/
|
|
77
|
+
remove(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Determine which positioning CSS rule to use.
|
|
80
|
+
*/
|
|
81
|
+
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
|
|
85
|
+
*
|
|
86
|
+
* Progress.set(0.4);
|
|
87
|
+
* Progress.set(1.0);
|
|
88
|
+
*/
|
|
89
|
+
function set(n: any): {
|
|
90
|
+
status: null;
|
|
91
|
+
settings: {
|
|
92
|
+
parent: HTMLElement;
|
|
93
|
+
progress: HTMLDivElement;
|
|
94
|
+
bar: HTMLDivElement;
|
|
95
|
+
minimum: number;
|
|
96
|
+
easing: string;
|
|
97
|
+
positionUsing: string;
|
|
98
|
+
speed: number;
|
|
99
|
+
trickle: boolean;
|
|
100
|
+
trickleSpeed: number;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Updates configuration.
|
|
104
|
+
*
|
|
105
|
+
* Progress.configure({
|
|
106
|
+
* minimum: 0.1
|
|
107
|
+
* });
|
|
108
|
+
*/
|
|
109
|
+
configure(options: any): /*elided*/ any;
|
|
110
|
+
set(n: any): /*elided*/ any;
|
|
111
|
+
isStarted(): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Shows the progress bar.
|
|
114
|
+
* This is the same as setting the status to 0%, except that it doesn't go backwards.
|
|
115
|
+
*
|
|
116
|
+
* Progress.start();
|
|
117
|
+
*
|
|
118
|
+
*/
|
|
119
|
+
start(): /*elided*/ any;
|
|
120
|
+
/**
|
|
121
|
+
* Hides the progress bar.
|
|
122
|
+
* This is the *sort of* the same as setting the status to 100%, with the
|
|
123
|
+
* difference being `done()` makes some placebo effect of some realistic motion.
|
|
124
|
+
*
|
|
125
|
+
* Progress.done();
|
|
126
|
+
*
|
|
127
|
+
* If `true` is passed, it will show the progress bar even if its hidden.
|
|
128
|
+
*
|
|
129
|
+
* Progress.done(true);
|
|
130
|
+
*/
|
|
131
|
+
done(force: any): /*elided*/ any;
|
|
132
|
+
/**
|
|
133
|
+
* Increments by a random amount.
|
|
134
|
+
*/
|
|
135
|
+
inc(amount: any): /*elided*/ any | undefined;
|
|
136
|
+
trickle(): /*elided*/ any | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* (Internal) renders the progress bar markup based on the `template`
|
|
139
|
+
* setting.
|
|
140
|
+
*/
|
|
141
|
+
render(fromStart: any): HTMLDivElement;
|
|
142
|
+
/**
|
|
143
|
+
* Removes the element. Opposite of render().
|
|
144
|
+
*/
|
|
145
|
+
remove(): void;
|
|
146
|
+
/**
|
|
147
|
+
* Determine which positioning CSS rule to use.
|
|
148
|
+
*/
|
|
149
|
+
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
150
|
+
};
|
|
151
|
+
function isStarted(): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Shows the progress bar.
|
|
154
|
+
* This is the same as setting the status to 0%, except that it doesn't go backwards.
|
|
155
|
+
*
|
|
156
|
+
* Progress.start();
|
|
157
|
+
*
|
|
158
|
+
*/
|
|
159
|
+
function start(): {
|
|
160
|
+
status: null;
|
|
161
|
+
settings: {
|
|
162
|
+
parent: HTMLElement;
|
|
163
|
+
progress: HTMLDivElement;
|
|
164
|
+
bar: HTMLDivElement;
|
|
165
|
+
minimum: number;
|
|
166
|
+
easing: string;
|
|
167
|
+
positionUsing: string;
|
|
168
|
+
speed: number;
|
|
169
|
+
trickle: boolean;
|
|
170
|
+
trickleSpeed: number;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Updates configuration.
|
|
174
|
+
*
|
|
175
|
+
* Progress.configure({
|
|
176
|
+
* minimum: 0.1
|
|
177
|
+
* });
|
|
178
|
+
*/
|
|
179
|
+
configure(options: any): /*elided*/ any;
|
|
180
|
+
/**
|
|
181
|
+
* Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
|
|
182
|
+
*
|
|
183
|
+
* Progress.set(0.4);
|
|
184
|
+
* Progress.set(1.0);
|
|
185
|
+
*/
|
|
186
|
+
set(n: any): /*elided*/ any;
|
|
187
|
+
isStarted(): boolean;
|
|
188
|
+
start(): /*elided*/ any;
|
|
189
|
+
/**
|
|
190
|
+
* Hides the progress bar.
|
|
191
|
+
* This is the *sort of* the same as setting the status to 100%, with the
|
|
192
|
+
* difference being `done()` makes some placebo effect of some realistic motion.
|
|
193
|
+
*
|
|
194
|
+
* Progress.done();
|
|
195
|
+
*
|
|
196
|
+
* If `true` is passed, it will show the progress bar even if its hidden.
|
|
197
|
+
*
|
|
198
|
+
* Progress.done(true);
|
|
199
|
+
*/
|
|
200
|
+
done(force: any): /*elided*/ any;
|
|
201
|
+
/**
|
|
202
|
+
* Increments by a random amount.
|
|
203
|
+
*/
|
|
204
|
+
inc(amount: any): /*elided*/ any | undefined;
|
|
205
|
+
trickle(): /*elided*/ any | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* (Internal) renders the progress bar markup based on the `template`
|
|
208
|
+
* setting.
|
|
209
|
+
*/
|
|
210
|
+
render(fromStart: any): HTMLDivElement;
|
|
211
|
+
/**
|
|
212
|
+
* Removes the element. Opposite of render().
|
|
213
|
+
*/
|
|
214
|
+
remove(): void;
|
|
215
|
+
/**
|
|
216
|
+
* Determine which positioning CSS rule to use.
|
|
217
|
+
*/
|
|
218
|
+
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Hides the progress bar.
|
|
222
|
+
* This is the *sort of* the same as setting the status to 100%, with the
|
|
223
|
+
* difference being `done()` makes some placebo effect of some realistic motion.
|
|
224
|
+
*
|
|
225
|
+
* Progress.done();
|
|
226
|
+
*
|
|
227
|
+
* If `true` is passed, it will show the progress bar even if its hidden.
|
|
228
|
+
*
|
|
229
|
+
* Progress.done(true);
|
|
230
|
+
*/
|
|
231
|
+
function done(force: any): {
|
|
232
|
+
status: null;
|
|
233
|
+
settings: {
|
|
234
|
+
parent: HTMLElement;
|
|
235
|
+
progress: HTMLDivElement;
|
|
236
|
+
bar: HTMLDivElement;
|
|
237
|
+
minimum: number;
|
|
238
|
+
easing: string;
|
|
239
|
+
positionUsing: string;
|
|
240
|
+
speed: number;
|
|
241
|
+
trickle: boolean;
|
|
242
|
+
trickleSpeed: number;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Updates configuration.
|
|
246
|
+
*
|
|
247
|
+
* Progress.configure({
|
|
248
|
+
* minimum: 0.1
|
|
249
|
+
* });
|
|
250
|
+
*/
|
|
251
|
+
configure(options: any): /*elided*/ any;
|
|
252
|
+
/**
|
|
253
|
+
* Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
|
|
254
|
+
*
|
|
255
|
+
* Progress.set(0.4);
|
|
256
|
+
* Progress.set(1.0);
|
|
257
|
+
*/
|
|
258
|
+
set(n: any): /*elided*/ any;
|
|
259
|
+
isStarted(): boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Shows the progress bar.
|
|
262
|
+
* This is the same as setting the status to 0%, except that it doesn't go backwards.
|
|
263
|
+
*
|
|
264
|
+
* Progress.start();
|
|
265
|
+
*
|
|
266
|
+
*/
|
|
267
|
+
start(): /*elided*/ any;
|
|
268
|
+
done(force: any): /*elided*/ any;
|
|
269
|
+
/**
|
|
270
|
+
* Increments by a random amount.
|
|
271
|
+
*/
|
|
272
|
+
inc(amount: any): /*elided*/ any | undefined;
|
|
273
|
+
trickle(): /*elided*/ any | undefined;
|
|
274
|
+
/**
|
|
275
|
+
* (Internal) renders the progress bar markup based on the `template`
|
|
276
|
+
* setting.
|
|
277
|
+
*/
|
|
278
|
+
render(fromStart: any): HTMLDivElement;
|
|
279
|
+
/**
|
|
280
|
+
* Removes the element. Opposite of render().
|
|
281
|
+
*/
|
|
282
|
+
remove(): void;
|
|
283
|
+
/**
|
|
284
|
+
* Determine which positioning CSS rule to use.
|
|
285
|
+
*/
|
|
286
|
+
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Increments by a random amount.
|
|
290
|
+
*/
|
|
291
|
+
function inc(amount: any): {
|
|
292
|
+
status: null;
|
|
293
|
+
settings: {
|
|
294
|
+
parent: HTMLElement;
|
|
295
|
+
progress: HTMLDivElement;
|
|
296
|
+
bar: HTMLDivElement;
|
|
297
|
+
minimum: number;
|
|
298
|
+
easing: string;
|
|
299
|
+
positionUsing: string;
|
|
300
|
+
speed: number;
|
|
301
|
+
trickle: boolean;
|
|
302
|
+
trickleSpeed: number;
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* Updates configuration.
|
|
306
|
+
*
|
|
307
|
+
* Progress.configure({
|
|
308
|
+
* minimum: 0.1
|
|
309
|
+
* });
|
|
310
|
+
*/
|
|
311
|
+
configure(options: any): /*elided*/ any;
|
|
312
|
+
/**
|
|
313
|
+
* Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
|
|
314
|
+
*
|
|
315
|
+
* Progress.set(0.4);
|
|
316
|
+
* Progress.set(1.0);
|
|
317
|
+
*/
|
|
318
|
+
set(n: any): /*elided*/ any;
|
|
319
|
+
isStarted(): boolean;
|
|
320
|
+
/**
|
|
321
|
+
* Shows the progress bar.
|
|
322
|
+
* This is the same as setting the status to 0%, except that it doesn't go backwards.
|
|
323
|
+
*
|
|
324
|
+
* Progress.start();
|
|
325
|
+
*
|
|
326
|
+
*/
|
|
327
|
+
start(): /*elided*/ any;
|
|
328
|
+
/**
|
|
329
|
+
* Hides the progress bar.
|
|
330
|
+
* This is the *sort of* the same as setting the status to 100%, with the
|
|
331
|
+
* difference being `done()` makes some placebo effect of some realistic motion.
|
|
332
|
+
*
|
|
333
|
+
* Progress.done();
|
|
334
|
+
*
|
|
335
|
+
* If `true` is passed, it will show the progress bar even if its hidden.
|
|
336
|
+
*
|
|
337
|
+
* Progress.done(true);
|
|
338
|
+
*/
|
|
339
|
+
done(force: any): /*elided*/ any;
|
|
340
|
+
inc(amount: any): /*elided*/ any | undefined;
|
|
341
|
+
trickle(): /*elided*/ any | undefined;
|
|
342
|
+
/**
|
|
343
|
+
* (Internal) renders the progress bar markup based on the `template`
|
|
344
|
+
* setting.
|
|
345
|
+
*/
|
|
346
|
+
render(fromStart: any): HTMLDivElement;
|
|
347
|
+
/**
|
|
348
|
+
* Removes the element. Opposite of render().
|
|
349
|
+
*/
|
|
350
|
+
remove(): void;
|
|
351
|
+
/**
|
|
352
|
+
* Determine which positioning CSS rule to use.
|
|
353
|
+
*/
|
|
354
|
+
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
355
|
+
} | undefined;
|
|
356
|
+
function trickle(): {
|
|
357
|
+
status: null;
|
|
358
|
+
settings: {
|
|
359
|
+
parent: HTMLElement;
|
|
360
|
+
progress: HTMLDivElement;
|
|
361
|
+
bar: HTMLDivElement;
|
|
362
|
+
minimum: number;
|
|
363
|
+
easing: string;
|
|
364
|
+
positionUsing: string;
|
|
365
|
+
speed: number;
|
|
366
|
+
trickle: boolean;
|
|
367
|
+
trickleSpeed: number;
|
|
368
|
+
};
|
|
369
|
+
/**
|
|
370
|
+
* Updates configuration.
|
|
371
|
+
*
|
|
372
|
+
* Progress.configure({
|
|
373
|
+
* minimum: 0.1
|
|
374
|
+
* });
|
|
375
|
+
*/
|
|
376
|
+
configure(options: any): /*elided*/ any;
|
|
377
|
+
/**
|
|
378
|
+
* Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
|
|
379
|
+
*
|
|
380
|
+
* Progress.set(0.4);
|
|
381
|
+
* Progress.set(1.0);
|
|
382
|
+
*/
|
|
383
|
+
set(n: any): /*elided*/ any;
|
|
384
|
+
isStarted(): boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Shows the progress bar.
|
|
387
|
+
* This is the same as setting the status to 0%, except that it doesn't go backwards.
|
|
388
|
+
*
|
|
389
|
+
* Progress.start();
|
|
390
|
+
*
|
|
391
|
+
*/
|
|
392
|
+
start(): /*elided*/ any;
|
|
393
|
+
/**
|
|
394
|
+
* Hides the progress bar.
|
|
395
|
+
* This is the *sort of* the same as setting the status to 100%, with the
|
|
396
|
+
* difference being `done()` makes some placebo effect of some realistic motion.
|
|
397
|
+
*
|
|
398
|
+
* Progress.done();
|
|
399
|
+
*
|
|
400
|
+
* If `true` is passed, it will show the progress bar even if its hidden.
|
|
401
|
+
*
|
|
402
|
+
* Progress.done(true);
|
|
403
|
+
*/
|
|
404
|
+
done(force: any): /*elided*/ any;
|
|
405
|
+
/**
|
|
406
|
+
* Increments by a random amount.
|
|
407
|
+
*/
|
|
408
|
+
inc(amount: any): /*elided*/ any | undefined;
|
|
409
|
+
trickle(): /*elided*/ any | undefined;
|
|
410
|
+
/**
|
|
411
|
+
* (Internal) renders the progress bar markup based on the `template`
|
|
412
|
+
* setting.
|
|
413
|
+
*/
|
|
414
|
+
render(fromStart: any): HTMLDivElement;
|
|
415
|
+
/**
|
|
416
|
+
* Removes the element. Opposite of render().
|
|
417
|
+
*/
|
|
418
|
+
remove(): void;
|
|
419
|
+
/**
|
|
420
|
+
* Determine which positioning CSS rule to use.
|
|
421
|
+
*/
|
|
422
|
+
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
423
|
+
} | undefined;
|
|
424
|
+
/**
|
|
425
|
+
* (Internal) renders the progress bar markup based on the `template`
|
|
426
|
+
* setting.
|
|
427
|
+
*/
|
|
428
|
+
function render(fromStart: any): HTMLDivElement;
|
|
429
|
+
/**
|
|
430
|
+
* Removes the element. Opposite of render().
|
|
431
|
+
*/
|
|
432
|
+
function remove(): void;
|
|
433
|
+
/**
|
|
434
|
+
* Determine which positioning CSS rule to use.
|
|
435
|
+
*/
|
|
436
|
+
function getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
437
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SpaceProps, type SpaceVerticalProps } from './interface';
|
|
2
|
+
declare const SpaceVertical: import("react").ForwardRefExoticComponent<SpaceVerticalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const Space: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
4
|
+
Vertical: import("react").ForwardRefExoticComponent<SpaceVerticalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
};
|
|
6
|
+
export { SpaceVertical };
|
|
7
|
+
export default Space;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export type SpaceGap = 'mini' | 'small' | 'medium' | 'large' | number;
|
|
3
|
+
export type AlignItems = 'start' | 'end' | 'center' | 'baseline';
|
|
4
|
+
export type JustifyContent = 'start' | 'end' | 'center' | 'baseline' | 'space-between';
|
|
5
|
+
export type Direction = 'vertical' | 'horizontal';
|
|
6
|
+
export interface SpaceProps {
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
className?: string | string[];
|
|
9
|
+
/**
|
|
10
|
+
* @zh 交叉轴方向对齐方式
|
|
11
|
+
*/
|
|
12
|
+
align?: AlignItems;
|
|
13
|
+
/**
|
|
14
|
+
* @zh 属性 align 的别名
|
|
15
|
+
*/
|
|
16
|
+
alignItems?: AlignItems;
|
|
17
|
+
/**
|
|
18
|
+
* @zh 主轴方向上对齐方式
|
|
19
|
+
*/
|
|
20
|
+
justifyContent?: JustifyContent;
|
|
21
|
+
/**
|
|
22
|
+
* @zh 方向
|
|
23
|
+
* @defaultValue horizontal
|
|
24
|
+
*/
|
|
25
|
+
direction?: Direction;
|
|
26
|
+
/**
|
|
27
|
+
* @zh 尺寸
|
|
28
|
+
* @defaultValue small
|
|
29
|
+
*/
|
|
30
|
+
size?: SpaceGap | SpaceGap[];
|
|
31
|
+
/**
|
|
32
|
+
* @zh 属性 size 的别名
|
|
33
|
+
*/
|
|
34
|
+
gap?: SpaceGap | SpaceGap[];
|
|
35
|
+
/**
|
|
36
|
+
* @zh 是否自动折行
|
|
37
|
+
*/
|
|
38
|
+
wrap?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @zh 设置分隔符
|
|
41
|
+
*/
|
|
42
|
+
split?: ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* @zh 子元素
|
|
45
|
+
*/
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* @zh 是否启用RTL模式
|
|
49
|
+
*/
|
|
50
|
+
rtl?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface SpaceVerticalProps extends Omit<SpaceProps, 'direction'> {
|
|
53
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* SuspenseFallbackTest 组件
|
|
4
|
+
* @description 用于测试Suspense的fallback状态,创建一个永远不会加载完成的懒加载组件
|
|
5
|
+
*/
|
|
6
|
+
declare const SuspenseFallbackTest: React.ForwardRefExoticComponent<object & React.RefAttributes<unknown>>;
|
|
7
|
+
export default SuspenseFallbackTest;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SuspenseFallbackTestProps = object;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A transition component inspired by the excellent
|
|
4
|
+
* [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should
|
|
5
|
+
* use it if you're using CSS transitions or animations. It's built upon the
|
|
6
|
+
* [`Transition`](https://reactcommunity.org/react-transition-group/transition)
|
|
7
|
+
* component, so it inherits all of its props.
|
|
8
|
+
*
|
|
9
|
+
* `CSSTransition` applies a pair of class names during the `appear`, `enter`,
|
|
10
|
+
* and `exit` states of the transition. The first class is applied and then a
|
|
11
|
+
* second `*-active` class in order to activate the CSS transition. After the
|
|
12
|
+
* transition, matching `*-done` class names are applied to persist the
|
|
13
|
+
* transition state.
|
|
14
|
+
*
|
|
15
|
+
* ```jsx
|
|
16
|
+
* function App() {
|
|
17
|
+
* const [inProp, setInProp] = useState(false);
|
|
18
|
+
* const refElement = useRef(null);
|
|
19
|
+
* return (
|
|
20
|
+
* <div>
|
|
21
|
+
* <CSSTransition refElement={refElement} in={inProp} timeout={200} classNames="my-element">
|
|
22
|
+
* <div ref={refElement}>
|
|
23
|
+
* {"I'll receive my-element-* classes"}
|
|
24
|
+
* </div>
|
|
25
|
+
* </CSSTransition>
|
|
26
|
+
* <button type="button" onClick={() => setInProp(true)}>
|
|
27
|
+
* Click to Enter
|
|
28
|
+
* </button>
|
|
29
|
+
* </div>
|
|
30
|
+
* );
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* When the `in` prop is set to `true`, the child component will first receive
|
|
35
|
+
* the class `example-enter`, then the `example-enter-active` will be added in
|
|
36
|
+
* the next tick. `CSSTransition` [forces a
|
|
37
|
+
* reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
|
|
38
|
+
* between before adding the `example-enter-active`. This is an important trick
|
|
39
|
+
* because it allows us to transition between `example-enter` and
|
|
40
|
+
* `example-enter-active` even though they were added immediately one after
|
|
41
|
+
* another. Most notably, this is what makes it possible for us to animate
|
|
42
|
+
* _appearance_.
|
|
43
|
+
*
|
|
44
|
+
* ```css
|
|
45
|
+
* .my-element-enter {
|
|
46
|
+
* opacity: 0;
|
|
47
|
+
* }
|
|
48
|
+
* .my-element-enter-active {
|
|
49
|
+
* opacity: 1;
|
|
50
|
+
* transition: opacity 200ms;
|
|
51
|
+
* }
|
|
52
|
+
* .my-element-exit {
|
|
53
|
+
* opacity: 1;
|
|
54
|
+
* }
|
|
55
|
+
* .my-element-exit-active {
|
|
56
|
+
* opacity: 0;
|
|
57
|
+
* transition: opacity 200ms;
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* `*-active` classes represent which styles you want to animate **to**, so it's
|
|
62
|
+
* important to add `transition` declaration only to them, otherwise transitions
|
|
63
|
+
* might not behave as intended! This might not be obvious when the transitions
|
|
64
|
+
* are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in
|
|
65
|
+
* the example above (minus `transition`), but it becomes apparent in more
|
|
66
|
+
* complex transitions.
|
|
67
|
+
*
|
|
68
|
+
* **Note**: If you're using the
|
|
69
|
+
* [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)
|
|
70
|
+
* prop, make sure to define styles for `.appear-*` classes as well.
|
|
71
|
+
*/
|
|
72
|
+
declare class CSSTransition extends React.Component {
|
|
73
|
+
static defaultProps: {
|
|
74
|
+
classNames: string;
|
|
75
|
+
};
|
|
76
|
+
refElement: undefined;
|
|
77
|
+
appliedClasses: {
|
|
78
|
+
appear: {};
|
|
79
|
+
enter: {};
|
|
80
|
+
exit: {};
|
|
81
|
+
};
|
|
82
|
+
onEnter: (maybeElement: any, maybeAppearing: any) => void;
|
|
83
|
+
onEntering: (maybeElement: any, maybeAppearing: any) => void;
|
|
84
|
+
onEntered: (maybeElement: any, maybeAppearing: any) => void;
|
|
85
|
+
onExit: (maybeElement: any) => void;
|
|
86
|
+
onExiting: (maybeElement: any) => void;
|
|
87
|
+
onExited: (maybeElement: any) => void;
|
|
88
|
+
resolveArguments: (maybeElement: any, maybeAppearing: any) => any[];
|
|
89
|
+
getClassNames: (type: any) => {
|
|
90
|
+
baseClassName: any;
|
|
91
|
+
activeClassName: any;
|
|
92
|
+
doneClassName: any;
|
|
93
|
+
};
|
|
94
|
+
addClass(element: any, type: any, phase: any): void;
|
|
95
|
+
removeClasses(element: any, type: any): void;
|
|
96
|
+
render(): React.JSX.Element;
|
|
97
|
+
}
|
|
98
|
+
export default CSSTransition;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The `<ReplaceTransition>` component is a specialized `Transition` component
|
|
4
|
+
* that animates between two children.
|
|
5
|
+
*
|
|
6
|
+
* ```jsx
|
|
7
|
+
* <ReplaceTransition in>
|
|
8
|
+
* <Fade><div>I appear first</div></Fade>
|
|
9
|
+
* <Fade><div>I replace the above</div></Fade>
|
|
10
|
+
* </ReplaceTransition>
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
declare class ReplaceTransition extends React.Component {
|
|
14
|
+
handleEnter: (...args: any[]) => void;
|
|
15
|
+
handleEntering: (...args: any[]) => void;
|
|
16
|
+
handleEntered: (...args: any[]) => void;
|
|
17
|
+
handleExit: (...args: any[]) => void;
|
|
18
|
+
handleExiting: (...args: any[]) => void;
|
|
19
|
+
handleExited: (...args: any[]) => void;
|
|
20
|
+
handleLifecycle(handler: any, idx: any, originalArgs: any): void;
|
|
21
|
+
render(): React.JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
export default ReplaceTransition;
|