@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/utils/pick.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
function s(n, i) {
|
|
3
|
+
const t = {};
|
|
4
|
+
return i.forEach((a) => {
|
|
5
|
+
const c = a;
|
|
6
|
+
a in n && (t[c] = n[c]);
|
|
7
|
+
}), t;
|
|
8
|
+
}
|
|
9
|
+
function e(n) {
|
|
10
|
+
const i = {};
|
|
11
|
+
return Object.entries(n ?? {}).forEach(([t, a], c, r) => {
|
|
12
|
+
t.startsWith("data-") && (i[t] = a), t.startsWith("aria-") && (i[t] = a);
|
|
13
|
+
}), i;
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
s as default,
|
|
17
|
+
s as pick,
|
|
18
|
+
e as pickDataAttributes
|
|
19
|
+
};
|
package/utils/pinyin.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { Component as m } from "react";
|
|
3
|
+
import o from "react-dom";
|
|
4
|
+
import O from "react-dom/client";
|
|
5
|
+
import { isReact19 as R, isReact18 as _ } from "./is.js";
|
|
6
|
+
import { warning as E } from "./warning.js";
|
|
7
|
+
import { isFunction as n, isObject as N } from "@unicom-cloud/utils/is";
|
|
8
|
+
const d = "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", f = o, i = f.findDOMNode;
|
|
9
|
+
function a(e) {
|
|
10
|
+
N(f[d]) && (f[d].usingClientEntryPoint = e);
|
|
11
|
+
}
|
|
12
|
+
let u;
|
|
13
|
+
try {
|
|
14
|
+
u = f.createRoot ?? O.createRoot;
|
|
15
|
+
} catch (e) {
|
|
16
|
+
console.error(e);
|
|
17
|
+
}
|
|
18
|
+
let s;
|
|
19
|
+
function p() {
|
|
20
|
+
_ && u ? s = (e, t) => {
|
|
21
|
+
a(!0);
|
|
22
|
+
const r = u(t);
|
|
23
|
+
return a(!1), r.render(e), {
|
|
24
|
+
...r,
|
|
25
|
+
render(l) {
|
|
26
|
+
r.render(l);
|
|
27
|
+
},
|
|
28
|
+
_unmount() {
|
|
29
|
+
return setTimeout(() => {
|
|
30
|
+
r?.unmount?.();
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
} : s = (e, t) => (n(o.render) && o.render(e, t), {
|
|
35
|
+
render(r) {
|
|
36
|
+
n(o.render) && o.render(r, t);
|
|
37
|
+
},
|
|
38
|
+
_unmount() {
|
|
39
|
+
n(o.unmountComponentAtNode) && o.unmountComponentAtNode(t);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
let c;
|
|
44
|
+
function D(e) {
|
|
45
|
+
const t = e.constructor;
|
|
46
|
+
if (!n(t)) return !1;
|
|
47
|
+
c ||= /* @__PURE__ */ new WeakSet();
|
|
48
|
+
const r = c.has(t);
|
|
49
|
+
return c.add(t), r;
|
|
50
|
+
}
|
|
51
|
+
function T(e, t) {
|
|
52
|
+
if (!e) return null;
|
|
53
|
+
if (e instanceof Element)
|
|
54
|
+
return e;
|
|
55
|
+
if (e.dom instanceof Element)
|
|
56
|
+
return e.dom;
|
|
57
|
+
if (e.current instanceof Element)
|
|
58
|
+
return e.current;
|
|
59
|
+
if (R) {
|
|
60
|
+
const r = e.props?.ref;
|
|
61
|
+
if (r && "current" in r && r.current instanceof Element)
|
|
62
|
+
return r.current;
|
|
63
|
+
}
|
|
64
|
+
return n(e.getRootDOMNode) ? e.getRootDOMNode() : e instanceof m && n(i) ? i(e) : t && (E(
|
|
65
|
+
_ && !D(t),
|
|
66
|
+
"Element does not define the `getRootDOMNode` method causing a call to React.findDOMNode. but findDOMNode is deprecated in StrictMode. Please check the code logic",
|
|
67
|
+
{ element: e, instance: t }
|
|
68
|
+
), n(i)) ? i(t) : null;
|
|
69
|
+
}
|
|
70
|
+
function h(e, t) {
|
|
71
|
+
if (!e) return;
|
|
72
|
+
let r;
|
|
73
|
+
R ? r = e?.props?.ref ?? e?.ref : r = e?.ref, r && (n(r) ? r(t) : "current" in r && (r.current = t));
|
|
74
|
+
}
|
|
75
|
+
function W(e) {
|
|
76
|
+
u = e, p();
|
|
77
|
+
}
|
|
78
|
+
p();
|
|
79
|
+
function k(e, t) {
|
|
80
|
+
return s(e, t);
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
h as callbackOriginRef,
|
|
84
|
+
T as findDOMNode,
|
|
85
|
+
k as render,
|
|
86
|
+
W as setCreateRoot
|
|
87
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import u from "lodash/throttle";
|
|
3
|
+
import "./is.js";
|
|
4
|
+
import { isFunction as l } from "@unicom-cloud/utils/is";
|
|
5
|
+
function h(m, i) {
|
|
6
|
+
const n = [].concat(m).filter((e, a, s) => e instanceof Element);
|
|
7
|
+
if (!(n.length && l(i))) return () => {
|
|
8
|
+
};
|
|
9
|
+
let t;
|
|
10
|
+
const o = u((...e) => {
|
|
11
|
+
c(), t = window.requestAnimationFrame(() => {
|
|
12
|
+
i(...e);
|
|
13
|
+
});
|
|
14
|
+
}, 227), r = new ResizeObserver(o);
|
|
15
|
+
n.forEach((e, a, s) => {
|
|
16
|
+
r.observe(e);
|
|
17
|
+
});
|
|
18
|
+
function c() {
|
|
19
|
+
t && window.cancelAnimationFrame(t);
|
|
20
|
+
}
|
|
21
|
+
function f() {
|
|
22
|
+
n.forEach((e, a, s) => {
|
|
23
|
+
r.unobserve(e);
|
|
24
|
+
}), r.disconnect(), o.cancel(), c();
|
|
25
|
+
}
|
|
26
|
+
return () => {
|
|
27
|
+
f();
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
h as default,
|
|
32
|
+
h as resizeObserver
|
|
33
|
+
};
|
package/utils/saveAs.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { getScrollMargins as d, compute as c } from "./compute.js";
|
|
3
|
+
import { alignNearest as x, canOverflow as C, getFrameElement as F, getParentElement as H, isHiddenByFrame as j, isScrollable as E } from "./compute.js";
|
|
4
|
+
import "./is.js";
|
|
5
|
+
import { isObjectLike as a, isFunction as i, isArray as s, isString as m, isBoolean as b } from "@unicom-cloud/utils/is";
|
|
6
|
+
const v = (e) => !!e && a(e) && !s(e) && Object.keys(e).length > 0 && ("behavior" in e ? m(e.behavior) : !0), g = (e) => !!e && a(e) && !s(e) && i(e.behavior), w = (e) => e === !1 ? { block: "end", inline: "nearest" } : v(e) ? e : { block: "start", inline: "nearest" }, y = (e) => {
|
|
7
|
+
let r = e;
|
|
8
|
+
for (; r; ) {
|
|
9
|
+
if (r === document)
|
|
10
|
+
return !0;
|
|
11
|
+
r = r.parentNode instanceof ShadowRoot ? r.parentNode.host : r.parentNode;
|
|
12
|
+
}
|
|
13
|
+
return !1;
|
|
14
|
+
};
|
|
15
|
+
function S(e, r) {
|
|
16
|
+
if (!e?.isConnected || !y(e))
|
|
17
|
+
return;
|
|
18
|
+
const t = d(e);
|
|
19
|
+
if (g(r))
|
|
20
|
+
try {
|
|
21
|
+
return r.behavior(c(e, r));
|
|
22
|
+
} catch (n) {
|
|
23
|
+
console.error("Custom scroll behavior failed:", n);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const l = b(r) ? void 0 : r?.behavior, o = w(r);
|
|
27
|
+
for (const { el: n, top: f, left: u } of c(e, o))
|
|
28
|
+
try {
|
|
29
|
+
n.scroll({
|
|
30
|
+
top: Math.max(0, f - t.top + t.bottom),
|
|
31
|
+
left: Math.max(0, u - t.left + t.right),
|
|
32
|
+
behavior: l
|
|
33
|
+
});
|
|
34
|
+
} catch (h) {
|
|
35
|
+
console.warn("Scroll failed on element:", n, h);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function B(e, r) {
|
|
39
|
+
e?.scrollIntoView && e.scrollIntoView(r);
|
|
40
|
+
}
|
|
41
|
+
function M(e, r) {
|
|
42
|
+
if (e) {
|
|
43
|
+
S(e, {
|
|
44
|
+
block: "start",
|
|
45
|
+
behavior: "auto",
|
|
46
|
+
scrollMode: "if-needed",
|
|
47
|
+
...r
|
|
48
|
+
});
|
|
49
|
+
const t = e.offsetHeight, { height: l } = e.getBoundingClientRect();
|
|
50
|
+
if (r && r.boundary && t !== l) {
|
|
51
|
+
const o = i(r.boundary) ? r.boundary(e) : r.boundary;
|
|
52
|
+
o.scrollTop = Math.round(
|
|
53
|
+
o.scrollTop * (t / l)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
x as alignNearest,
|
|
60
|
+
C as canOverflow,
|
|
61
|
+
c as compute,
|
|
62
|
+
M as default,
|
|
63
|
+
F as getFrameElement,
|
|
64
|
+
w as getOptions,
|
|
65
|
+
H as getParentElement,
|
|
66
|
+
d as getScrollMargins,
|
|
67
|
+
g as isCustomScrollBehavior,
|
|
68
|
+
j as isHiddenByFrame,
|
|
69
|
+
y as isInDocument,
|
|
70
|
+
E as isScrollable,
|
|
71
|
+
v as isStandardScrollBehavior,
|
|
72
|
+
S as scrollIntoView,
|
|
73
|
+
M as scrollIntoViewIfNeeded,
|
|
74
|
+
B as scrollIntoViewNative
|
|
75
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { UI_PC_THEME_DARK_CLASS_NAME as i } from "@unicom-cloud/utils/constant/ui";
|
|
3
|
+
import { CSS_VARIABLE_ELEMENT as n } from "./constant.js";
|
|
4
|
+
const o = "dark";
|
|
5
|
+
function r(e, s) {
|
|
6
|
+
e.classList.add(s);
|
|
7
|
+
}
|
|
8
|
+
function m(e, s) {
|
|
9
|
+
e.classList.remove(s);
|
|
10
|
+
}
|
|
11
|
+
function c(e) {
|
|
12
|
+
const {
|
|
13
|
+
element: s = n,
|
|
14
|
+
className: t = i,
|
|
15
|
+
mode: a = o
|
|
16
|
+
} = e ?? {};
|
|
17
|
+
return a === o ? r(s, t) : m(s, t), () => {
|
|
18
|
+
m(s, t);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function f(e) {
|
|
22
|
+
c({ ...e, mode: "light" });
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
c as default,
|
|
26
|
+
f as removeDarkTheme,
|
|
27
|
+
c as setDarkTheme
|
|
28
|
+
};
|
package/utils/setDir.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { UI_PC_PREFIX as e } from "@unicom-cloud/utils/constant/ui.js";
|
|
3
|
+
import { CSS_VARIABLE_ELEMENT as s } from "./constant.js";
|
|
4
|
+
import "./is.js";
|
|
5
|
+
import { isPlainObject as o } from "@unicom-cloud/utils/is";
|
|
6
|
+
function a(r) {
|
|
7
|
+
if (!o(r)) return;
|
|
8
|
+
const { prefix: l = e, dir: i = "ltr" } = r, t = s;
|
|
9
|
+
t.setAttribute("dir", i), t.classList.remove("ltr"), t.classList.remove("rtl"), t.classList.add(i);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
a as default,
|
|
13
|
+
a as setDir
|
|
14
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { UI_PC_PREFIX as y } from "@unicom-cloud/utils/constant/ui";
|
|
3
|
+
import c from "@unicom-cloud/utils/tinycolor";
|
|
4
|
+
import * as o from "@unicom-cloud/utils/ui-color";
|
|
5
|
+
import { CSS_VARIABLE_ELEMENT as u } from "./constant.js";
|
|
6
|
+
function _(s) {
|
|
7
|
+
const {
|
|
8
|
+
color: e,
|
|
9
|
+
element: t = u,
|
|
10
|
+
isDark: f = !1,
|
|
11
|
+
prefix: a = y
|
|
12
|
+
} = s ?? {}, i = {
|
|
13
|
+
color: e
|
|
14
|
+
}, m = f ? o.generateDark(i) : o.generate(i);
|
|
15
|
+
new c(e).equals(o.primary.value) ? l() : m.forEach((n, r, p) => {
|
|
16
|
+
t.style.setProperty(
|
|
17
|
+
`--${a}-primary-${r + 1}`,
|
|
18
|
+
n.toRgbArrayString()
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
function l() {
|
|
22
|
+
m.forEach((n, r, p) => {
|
|
23
|
+
t.style.removeProperty(`--${a}-primary-${r + 1}`);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return l;
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
_ as default,
|
|
30
|
+
_ as setPrimaryColor
|
|
31
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { UI_PC_PREFIX as m } from "@unicom-cloud/utils/constant/ui.js";
|
|
3
|
+
import n from "@unicom-cloud/utils/tinycolor";
|
|
4
|
+
import { CSS_VARIABLE_ELEMENT as p } from "./constant.js";
|
|
5
|
+
import "./is.js";
|
|
6
|
+
import { isPlainObject as $ } from "@unicom-cloud/utils/is";
|
|
7
|
+
function R(s) {
|
|
8
|
+
if (!$(s)) return;
|
|
9
|
+
const { prefix: e = m, element: g, ...i } = s, c = {
|
|
10
|
+
primary: {
|
|
11
|
+
default: `--${e}-primary-6`,
|
|
12
|
+
hover: `--${e}-primary-5`,
|
|
13
|
+
active: `--${e}-primary-7`
|
|
14
|
+
},
|
|
15
|
+
success: {
|
|
16
|
+
default: `--${e}-green-6`,
|
|
17
|
+
hover: `--${e}-green-5`,
|
|
18
|
+
active: `--${e}-green-7`
|
|
19
|
+
},
|
|
20
|
+
info: {
|
|
21
|
+
default: `--${e}-primary-6`,
|
|
22
|
+
hover: `--${e}-primary-5`,
|
|
23
|
+
active: `--${e}-primary-7`
|
|
24
|
+
},
|
|
25
|
+
// warning: {
|
|
26
|
+
// default: `--${prefix}-orangered-6`,
|
|
27
|
+
// hover: `--${prefix}-orangered-5`,
|
|
28
|
+
// active: `--${prefix}-orangered-7`,
|
|
29
|
+
// },
|
|
30
|
+
warning: {
|
|
31
|
+
default: `--${e}-orange-6`,
|
|
32
|
+
hover: `--${e}-orange-5`,
|
|
33
|
+
active: `--${e}-orange-7`
|
|
34
|
+
},
|
|
35
|
+
danger: {
|
|
36
|
+
default: `--${e}-red-6`,
|
|
37
|
+
hover: `--${e}-red-5`,
|
|
38
|
+
active: `--${e}-red-7`
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
Object.entries(c).forEach(([o, r], h, d) => {
|
|
42
|
+
c[`${o}Color`] = r;
|
|
43
|
+
const l = i[o];
|
|
44
|
+
if (!l) return;
|
|
45
|
+
const a = new n(l), t = g || p;
|
|
46
|
+
t.style.setProperty(r.default, a.toRgbArrayString());
|
|
47
|
+
const y = i[`${o}Hover`];
|
|
48
|
+
y ? t.style.setProperty(r.hover, new n(y).toRgbArrayString()) : t.style.setProperty(r.hover, a.lighten(7).toRgbArrayString());
|
|
49
|
+
const f = i[`${o}Active`];
|
|
50
|
+
f ? t.style.setProperty(r.active, new n(f).toRgbArrayString()) : t.style.setProperty(r.active, a.lighten(-7).toRgbArrayString());
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
R as default,
|
|
55
|
+
R as setTheme
|
|
56
|
+
};
|
package/utils/style.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
const o = [
|
|
3
|
+
"transform",
|
|
4
|
+
"WebkitTransform",
|
|
5
|
+
"msTransform",
|
|
6
|
+
"MozTransform",
|
|
7
|
+
"OTransform"
|
|
8
|
+
];
|
|
9
|
+
function s(t) {
|
|
10
|
+
return {
|
|
11
|
+
maxWidth: t,
|
|
12
|
+
minWidth: t,
|
|
13
|
+
width: t
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function f(t) {
|
|
17
|
+
const n = {};
|
|
18
|
+
return o.forEach((r) => {
|
|
19
|
+
n[r] = t;
|
|
20
|
+
}), n;
|
|
21
|
+
}
|
|
22
|
+
function a(t, n) {
|
|
23
|
+
if (!t || !n)
|
|
24
|
+
return null;
|
|
25
|
+
let r = n;
|
|
26
|
+
r === "float" && (r = "cssFloat");
|
|
27
|
+
try {
|
|
28
|
+
if (document.defaultView) {
|
|
29
|
+
const e = document.defaultView.getComputedStyle(t, "");
|
|
30
|
+
return t.style[r] || e ? e[r] : "";
|
|
31
|
+
}
|
|
32
|
+
} catch {
|
|
33
|
+
return t.style[r];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
s as fixedWidth,
|
|
38
|
+
a as getStyle,
|
|
39
|
+
f as setTransformStyle
|
|
40
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { isForwardRef as t, ForwardRef as f, Memo as o } from "react-is";
|
|
3
|
+
import { isDOMElement as i, isForwardRefReact as u, isReactComponent as s, isClassComponent as p } from "./is.js";
|
|
4
|
+
function n(r) {
|
|
5
|
+
return r ? i(r) || u(r) || t(r) || r.$$typeof === f ? !0 : r.$$typeof === o ? r.type?.$$typeof === f : s(r) ? p(r) : !1 : !1;
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
n as default,
|
|
9
|
+
n as supportRef
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
function i(n, a = 1) {
|
|
3
|
+
let e = null;
|
|
4
|
+
function t(...l) {
|
|
5
|
+
return e ? cancelAnimationFrame(e) : a == 2 && (n(...l), e = requestAnimationFrame(() => {
|
|
6
|
+
})), e = requestAnimationFrame(() => {
|
|
7
|
+
n(...l), e = null;
|
|
8
|
+
}), e;
|
|
9
|
+
}
|
|
10
|
+
return t.cancel = () => {
|
|
11
|
+
cancelAnimationFrame(e), e = null;
|
|
12
|
+
}, t;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as default,
|
|
16
|
+
i as throttleByRaf
|
|
17
|
+
};
|
package/utils/toArray.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import s from "react";
|
|
3
|
+
import { isFragment as f } from "react-is";
|
|
4
|
+
import "./is.js";
|
|
5
|
+
import { isArray as m } from "@unicom-cloud/utils/is";
|
|
6
|
+
function t(o, p = {}) {
|
|
7
|
+
const e = [];
|
|
8
|
+
return s.Children.forEach(o, (r) => {
|
|
9
|
+
r == null && !p.keepEmpty || (m(r) ? e.push(...t(r, p)) : f(r) && "props" in r && r.props ? e.push(...t(r.props.children, p)) : e.push(r));
|
|
10
|
+
}), e;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
t as default,
|
|
14
|
+
t as toArray
|
|
15
|
+
};
|
package/utils/tree.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { default as a, findNodeBy as r, getChildWithParentBy as y, getItemBy as B, getItemBy2 as g, getItemBy3 as m, getItemByID as d, getLabelFromDictionaryByValue as i, searchTree as l, default as o } from "@unicom-cloud/utils/tree";
|
|
3
|
+
export {
|
|
4
|
+
a as default,
|
|
5
|
+
r as findNodeBy,
|
|
6
|
+
y as getChildWithParentBy,
|
|
7
|
+
B as getItemBy,
|
|
8
|
+
g as getItemBy2,
|
|
9
|
+
m as getItemBy3,
|
|
10
|
+
d as getItemByID,
|
|
11
|
+
i as getLabelFromDictionaryByValue,
|
|
12
|
+
l as searchTree,
|
|
13
|
+
o as tree
|
|
14
|
+
};
|
package/utils/tween.js
ADDED
package/utils/uuid.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* 2025-11-14 09:11:19 */
|
|
2
|
+
import { ArrayValidator as l, BooleanValidator as t, CustomValidator as o, DefaultValidateMessage as d, NumberValidator as r, ObjectValidator as i, Schema as V, StringValidator as m, TypeValidator as c, defaultValidateLocale as u, enUSValidateLocale as f, mergeTemplate as s, default as g, zhCNValidateLocale as n } from "@unicom-cloud/utils/validate";
|
|
3
|
+
export {
|
|
4
|
+
l as ArrayValidator,
|
|
5
|
+
t as BooleanValidator,
|
|
6
|
+
o as CustomValidator,
|
|
7
|
+
d as DefaultValidateMessage,
|
|
8
|
+
r as NumberValidator,
|
|
9
|
+
i as ObjectValidator,
|
|
10
|
+
V as Schema,
|
|
11
|
+
m as StringValidator,
|
|
12
|
+
c as TypeValidator,
|
|
13
|
+
u as defaultValidateLocale,
|
|
14
|
+
f as enUSValidateLocale,
|
|
15
|
+
s as mergeTemplate,
|
|
16
|
+
g as validate,
|
|
17
|
+
n as zhCNValidateLocale
|
|
18
|
+
};
|
package/utils/warning.js
ADDED