@unicom-cloud/ui-common 0.1.5 → 0.1.7
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 +1 -1
- package/Empty.js +1 -1
- package/Flex.js +1 -1
- package/Motion.js +9 -0
- package/Progress.js +1 -1
- package/ResizeObserver.js +10 -0
- package/Space.js +1 -1
- package/SuspenseFallbackTest.js +1 -1
- package/TransitionGroup.js +30 -29
- package/development/index.js +38 -27
- package/empty/index.js +36 -32
- package/flex/index.js +56 -50
- package/flex/interface.js +1 -1
- package/higher-order/index.js +1 -1
- package/higher-order/with-speech-synthesis/index.js +33 -37
- package/higher-order/withSpeechSynthesis.js +1 -1
- package/hooks/create-deep-compare-effect/index.js +1 -1
- package/hooks/create-update-effect/index.js +1 -1
- package/hooks/create-use-storage-state/index.js +1 -1
- package/hooks/createDeepCompareEffect.js +1 -1
- package/hooks/createUpdateEffect.js +1 -1
- package/hooks/createUseStorageState.js +1 -1
- package/hooks/index.js +177 -171
- package/hooks/use-async-effect/index.js +1 -1
- package/hooks/use-boolean/index.js +1 -1
- package/hooks/use-click-away/index.js +19 -20
- package/hooks/use-computed-state/index.js +1 -1
- package/hooks/use-controllable-value/index.js +5 -5
- package/hooks/use-cookie-state/index.js +1 -1
- package/hooks/use-count-down/index.js +3 -3
- package/hooks/use-counter/index.js +1 -1
- package/hooks/use-create/index.js +1 -1
- package/hooks/use-creation/index.js +1 -1
- package/hooks/use-debounce/index.js +1 -1
- package/hooks/use-debounce-effect/index.js +1 -1
- package/hooks/use-debounce-fn/index.js +1 -1
- package/hooks/use-deep-compare-effect/index.js +1 -1
- package/hooks/use-deep-compare-layout-effect/index.js +1 -1
- package/hooks/use-document-visibility/index.js +1 -1
- package/hooks/use-drag/index.js +10 -10
- package/hooks/use-drop/index.js +1 -1
- package/hooks/use-event/index.js +10 -0
- package/hooks/use-event-listener/index.js +15 -16
- package/hooks/use-event-target/index.js +3 -3
- package/hooks/use-external/index.js +1 -1
- package/hooks/use-favicon/index.js +1 -1
- package/hooks/use-focus-within/index.js +1 -1
- package/hooks/use-force-update/index.js +1 -1
- package/hooks/use-fullscreen/index.js +13 -13
- package/hooks/use-get-state/index.js +6 -6
- package/hooks/use-history-travel/index.js +18 -18
- package/hooks/use-hover/index.js +1 -1
- package/hooks/use-id/index.js +1 -1
- package/hooks/use-in-view/index.js +1 -1
- package/hooks/use-in-viewport/index.js +17 -18
- package/hooks/use-infinite-scroll/index.js +1 -1
- package/hooks/use-intersection-observer/index.js +7 -6
- package/hooks/use-intersection-observers/index.js +34 -26
- package/hooks/use-interval/index.js +7 -7
- package/hooks/use-is-first-render/index.js +1 -1
- package/hooks/use-isomorphic-layout-effect/index.js +1 -1
- package/hooks/use-key-press/index.js +21 -21
- package/hooks/use-keyboard-event/index.js +1 -1
- package/hooks/use-latest/index.js +1 -1
- package/hooks/use-listen-window-resize/index.js +4 -4
- package/hooks/use-local-storage-state/index.js +1 -1
- package/hooks/use-lock-fn/index.js +1 -1
- package/hooks/use-long-press/index.js +24 -24
- package/hooks/use-map/index.js +1 -1
- package/hooks/use-media/index.js +1 -1
- package/hooks/use-memo/index.js +9 -0
- package/hooks/use-memoized-fn/index.js +1 -1
- package/hooks/use-merge-props/index.js +1 -1
- package/hooks/use-merge-value/index.js +1 -1
- package/hooks/use-mount/index.js +1 -1
- package/hooks/use-mouse/index.js +1 -1
- package/hooks/use-mutation-observer/index.js +9 -9
- package/hooks/use-mutation-observers/index.js +33 -25
- package/hooks/use-network/index.js +1 -1
- package/hooks/use-online-status/index.js +1 -1
- package/hooks/use-overflow-hidden/index.js +1 -1
- package/hooks/use-override-ref/index.js +3 -3
- package/hooks/use-pagination/index.js +1 -1
- package/hooks/use-persist-callback/index.js +1 -1
- package/hooks/use-prefers-color-scheme-dark/index.js +1 -1
- package/hooks/use-previous/index.js +1 -1
- package/hooks/use-raf-interval/index.js +15 -15
- package/hooks/use-raf-state/index.js +1 -1
- package/hooks/use-raf-timeout/index.js +3 -3
- package/hooks/use-reactive/index.js +7 -7
- package/hooks/use-ref-latest/index.js +1 -1
- package/hooks/use-refs/index.js +4 -4
- package/hooks/use-request/index.js +1 -1
- package/hooks/use-request/src/Fetch.js +1 -1
- package/hooks/use-request/src/plugins/useAutoRunPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useCachePlugin.js +3 -3
- package/hooks/use-request/src/plugins/useDebouncePlugin.js +1 -1
- package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +8 -8
- package/hooks/use-request/src/plugins/usePollingPlugin.js +13 -13
- package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +3 -3
- package/hooks/use-request/src/plugins/useRetryPlugin.js +5 -5
- package/hooks/use-request/src/plugins/useThrottlePlugin.js +3 -3
- package/hooks/use-request/src/useRequest.js +1 -1
- package/hooks/use-request/src/useRequestImplement.js +7 -7
- package/hooks/use-request/src/utils/cache.js +1 -1
- package/hooks/use-request/src/utils/cachePromise.js +1 -1
- package/hooks/use-request/src/utils/cacheSubscribe.js +1 -1
- package/hooks/use-request/src/utils/isDocumentVisible.js +1 -1
- package/hooks/use-request/src/utils/isOnline.js +1 -1
- package/hooks/use-request/src/utils/limit.js +1 -1
- package/hooks/use-request/src/utils/subscribeFocus.js +1 -1
- package/hooks/use-request/src/utils/subscribeReVisible.js +1 -1
- package/hooks/use-reset-state/index.js +7 -7
- package/hooks/use-resize-observer/index.js +1 -1
- package/hooks/use-resize-observers/index.js +34 -26
- package/hooks/use-responsive/index.js +1 -1
- package/hooks/use-safe-state/index.js +4 -4
- package/hooks/use-scroll/index.js +1 -1
- package/hooks/use-selections/index.js +1 -1
- package/hooks/use-session-storage-state/index.js +1 -1
- package/hooks/use-set/index.js +1 -1
- package/hooks/use-set-state/index.js +1 -1
- package/hooks/use-size/index.js +20 -23
- package/hooks/use-state-callback/index.js +6 -6
- package/hooks/use-state-with-promise/index.js +1 -1
- package/hooks/use-sync-state/index.js +15 -0
- package/hooks/use-text-selection/index.js +13 -13
- package/hooks/use-theme/index.js +1 -1
- package/hooks/use-throttle/index.js +1 -1
- package/hooks/use-throttle-effect/index.js +1 -1
- package/hooks/use-throttle-fn/index.js +6 -6
- package/hooks/use-timeout/index.js +3 -3
- package/hooks/use-title/index.js +1 -1
- package/hooks/use-toggle/index.js +1 -1
- package/hooks/use-tracked-effect/index.js +1 -1
- package/hooks/use-unmount/index.js +1 -1
- package/hooks/use-unmounted-ref/index.js +4 -4
- package/hooks/use-update/index.js +1 -1
- package/hooks/use-update-effect/index.js +1 -1
- package/hooks/use-update-layout-effect/index.js +1 -1
- package/hooks/use-url-state/index.js +3 -3
- package/hooks/use-virtual-list/index.js +10 -10
- package/hooks/use-watch/index.js +1 -1
- package/hooks/use-web-socket/index.js +30 -30
- package/hooks/use-why-did-you-update/index.js +1 -1
- package/hooks/use-window-size/index.js +28 -25
- package/hooks/useAsyncEffect.js +1 -1
- package/hooks/useBoolean.js +1 -1
- package/hooks/useClickAway.js +4 -5
- package/hooks/useComputedState.js +1 -1
- package/hooks/useControllableValue.js +1 -1
- package/hooks/useCookieState.js +1 -1
- package/hooks/useCountDown.js +1 -1
- package/hooks/useCounter.js +1 -1
- package/hooks/useCreate.js +1 -1
- package/hooks/useCreation.js +1 -1
- package/hooks/useDebounce.js +1 -1
- package/hooks/useDebounceEffect.js +1 -1
- package/hooks/useDebounceFn.js +1 -1
- package/hooks/useDeepCompareEffect.js +1 -1
- package/hooks/useDeepCompareLayoutEffect.js +1 -1
- package/hooks/useDocumentVisibility.js +1 -1
- package/hooks/useDrag.js +1 -1
- package/hooks/useDrop.js +1 -1
- package/hooks/useEvent.js +7 -0
- package/hooks/useEventListener.js +4 -5
- package/hooks/useEventTarget.js +1 -1
- package/hooks/useExternal.js +1 -1
- package/hooks/useFavicon.js +1 -1
- package/hooks/useFocusWithin.js +1 -1
- package/hooks/useForceUpdate.js +1 -1
- package/hooks/useFullscreen.js +1 -1
- package/hooks/useGetState.js +1 -1
- package/hooks/useHistoryTravel.js +1 -1
- package/hooks/useHover.js +1 -1
- package/hooks/useId.js +1 -1
- package/hooks/useInView.js +1 -1
- package/hooks/useInViewport.js +4 -5
- package/hooks/useInfiniteScroll.js +1 -1
- package/hooks/useIntersectionObserver.js +5 -4
- package/hooks/useIntersectionObservers.js +11 -7
- package/hooks/useInterval.js +1 -1
- package/hooks/useIsFirstRender.js +1 -1
- package/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/hooks/useKeyPress.js +1 -1
- package/hooks/useKeyboardEvent.js +1 -1
- package/hooks/useLatest.js +1 -1
- package/hooks/useListenWindowResize.js +1 -1
- package/hooks/useLocalStorageState.js +1 -1
- package/hooks/useLockFn.js +1 -1
- package/hooks/useLongPress.js +1 -1
- package/hooks/useMap.js +1 -1
- package/hooks/useMedia.js +1 -1
- package/hooks/useMemo.js +6 -0
- package/hooks/useMemoizedFn.js +1 -1
- package/hooks/useMergeProps.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useMount.js +1 -1
- package/hooks/useMouse.js +1 -1
- package/hooks/useMutationObserver.js +1 -1
- package/hooks/useMutationObservers.js +11 -7
- package/hooks/useNetwork.js +1 -1
- package/hooks/useOnlineStatus.js +1 -1
- package/hooks/useOverflowHidden.js +1 -1
- package/hooks/useOverrideRef.js +3 -3
- package/hooks/usePagination.js +1 -1
- package/hooks/usePersistCallback.js +1 -1
- package/hooks/usePrefersColorSchemeDark.js +1 -1
- package/hooks/usePrevious.js +1 -1
- package/hooks/useRafInterval.js +1 -1
- package/hooks/useRafState.js +1 -1
- package/hooks/useRafTimeout.js +1 -1
- package/hooks/useReactive.js +1 -1
- package/hooks/useRefLatest.js +1 -1
- package/hooks/useRefs.js +1 -1
- package/hooks/useRequest.js +1 -1
- package/hooks/useResetState.js +1 -1
- package/hooks/useResizeObserver.js +1 -1
- package/hooks/useResizeObservers.js +11 -7
- package/hooks/useResponsive.js +1 -1
- package/hooks/useSafeState.js +1 -1
- package/hooks/useScroll.js +1 -1
- package/hooks/useSelections.js +1 -1
- package/hooks/useSessionStorageState.js +1 -1
- package/hooks/useSet.js +1 -1
- package/hooks/useSetState.js +1 -1
- package/hooks/useSize.js +4 -3
- package/hooks/useStateCallback.js +1 -1
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useSyncState.js +10 -0
- package/hooks/useTextSelection.js +1 -1
- package/hooks/useTheme.js +1 -1
- package/hooks/useThrottle.js +1 -1
- package/hooks/useThrottleEffect.js +1 -1
- package/hooks/useThrottleFn.js +1 -1
- package/hooks/useTimeout.js +1 -1
- package/hooks/useTitle.js +1 -1
- package/hooks/useToggle.js +1 -1
- package/hooks/useTrackedEffect.js +1 -1
- package/hooks/useUnmount.js +1 -1
- package/hooks/useUnmountedRef.js +1 -1
- package/hooks/useUpdate.js +1 -1
- package/hooks/useUpdateEffect.js +1 -1
- package/hooks/useUpdateLayoutEffect.js +1 -1
- package/hooks/useUrlState.js +1 -1
- package/hooks/useVirtualList.js +1 -1
- package/hooks/useWatch.js +1 -1
- package/hooks/useWebSocket.js +1 -1
- package/hooks/useWhyDidYouUpdate.js +1 -1
- package/hooks/useWindowSize.js +4 -3
- package/hooks/utils/createEffectWithTarget.js +11 -12
- package/hooks/utils/depsAreSame.js +1 -1
- package/hooks/utils/depsEqual.js +1 -1
- package/hooks/utils/domTarget.js +1 -1
- package/hooks/utils/getDocumentOrShadow.js +5 -6
- package/hooks/utils/index.js +1 -1
- package/hooks/utils/isAppleDevice.js +1 -1
- package/hooks/utils/isBrowser.js +1 -1
- package/hooks/utils/isDev.js +1 -1
- package/hooks/utils/rect.js +1 -1
- package/hooks/utils/useDeepCompareWithTarget.js +4 -4
- package/hooks/utils/useEffectWithTarget.js +1 -1
- package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +1 -1
- package/hooks/utils/useLayoutEffectWithTarget.js +1 -1
- package/hooks/utils.js +1 -1
- package/icons/file/index.js +31 -24
- package/icons/file.js +1 -1
- package/index.js +47 -46
- package/motion/CSSMotion.js +102 -0
- package/motion/CSSMotionList.js +100 -0
- package/motion/context.js +14 -0
- package/motion/hooks/useDomMotionEvents.js +21 -0
- package/motion/hooks/useNextFrame.js +24 -0
- package/motion/hooks/useStatus.js +121 -0
- package/motion/hooks/useStepQueue.js +44 -0
- package/motion/index.js +9 -0
- package/motion/interface.js +14 -0
- package/motion/util/diff.js +56 -0
- package/motion/util/motion.js +56 -0
- package/package.json +1 -1
- package/progress/index.js +1 -1
- package/resize-observer/Collection.js +25 -0
- package/resize-observer/SingleObserver.js +48 -0
- package/resize-observer/index.js +27 -0
- package/resize-observer/observerUtil.js +22 -0
- package/space/index.js +65 -52
- package/suspense-fallback-test/index.js +1 -1
- package/transition-group/CSSTransition.js +59 -54
- package/transition-group/ChildMapping.js +68 -0
- package/transition-group/PqbCSSTransition.js +22 -18
- package/transition-group/ReplaceTransition.js +7 -7
- package/transition-group/SwitchTransition.js +1 -1
- package/transition-group/Transition.js +56 -52
- package/transition-group/TransitionGroup.js +2 -3
- package/transition-group/TransitionGroupContext.js +1 -1
- package/transition-group/index.js +30 -29
- package/types/hooks/index.d.ts +3 -0
- package/types/hooks/use-event/index.d.ts +2 -0
- package/types/hooks/use-intersection-observers/index.d.ts +3 -1
- package/types/hooks/use-listen-window-resize/index.d.ts +4 -4
- package/types/hooks/use-memo/index.d.ts +2 -0
- package/types/hooks/use-mutation-observers/index.d.ts +3 -1
- package/types/hooks/use-resize-observers/index.d.ts +3 -1
- package/types/hooks/use-size/index.d.ts +1 -1
- package/types/hooks/use-sync-state/index.d.ts +10 -0
- package/types/hooks/use-window-size/index.d.ts +2 -3
- package/types/motion/CSSMotion.d.ts +77 -0
- package/types/motion/CSSMotionList.d.ts +34 -0
- package/types/motion/context.d.ts +9 -0
- package/types/motion/hooks/useDomMotionEvents.d.ts +3 -0
- package/types/motion/hooks/useNextFrame.d.ts +7 -0
- package/types/motion/hooks/useStatus.d.ts +5 -0
- package/types/motion/hooks/useStepQueue.d.ts +8 -0
- package/types/motion/index.d.ts +9 -0
- package/types/motion/interface.d.ts +22 -0
- package/types/motion/util/diff.d.ts +20 -0
- package/types/motion/util/motion.d.ts +10 -0
- package/types/resize-observer/Collection.d.ts +9 -0
- package/types/resize-observer/SingleObserver.d.ts +7 -0
- package/types/resize-observer/index.d.ts +7 -0
- package/types/resize-observer/interface.d.ts +25 -0
- package/types/resize-observer/observerUtil.d.ts +3 -0
- package/types/space/interface.d.ts +1 -1
- package/types/transition-group/CSSTransition.d.ts +0 -1
- package/types/transition-group/{utils/ChildMapping.d.ts → ChildMapping.d.ts} +4 -4
- package/types/transition-group/SwitchTransition.d.ts +3 -3
- package/types/transition-group/Transition.d.ts +1 -1
- package/types/transition-group/TransitionGroup.d.ts +1 -1
- package/types/transition-group/index.d.ts +1 -1
- package/types/utils/callbackOriginRef.d.ts +4 -0
- package/types/utils/dom.d.ts +2 -1
- package/types/utils/findRootElement.d.ts +23 -0
- package/types/utils/index.d.ts +4 -2
- package/types/utils/is.d.ts +5 -4
- package/types/utils/lodash.d.ts +2 -1
- package/types/utils/ref.d.ts +27 -0
- package/types/utils/setCreateRoot.d.ts +13 -0
- package/types/utils/toArray.d.ts +3 -3
- package/utils/callbackOriginRef.js +11 -0
- package/utils/caseName.js +1 -1
- package/utils/className.js +1 -1
- package/utils/compute.js +1 -1
- package/utils/constant.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/date.js +1 -1
- package/utils/dayjs.js +1 -1
- package/utils/dom.js +12 -10
- package/utils/emitter.js +1 -1
- package/utils/fileToURL.js +1 -1
- package/utils/fillNBSP.js +1 -1
- package/utils/findRootElement.js +28 -0
- package/utils/findScrollParent.js +1 -1
- package/utils/getHighlightText.js +1 -1
- package/utils/getHotkeyHandler.js +1 -1
- package/utils/getStringLength.js +1 -1
- package/utils/include.js +1 -1
- package/utils/index.js +341 -329
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.js +72 -81
- package/utils/keyboardCode.js +1 -1
- package/utils/lodash.js +45 -43
- package/utils/math.js +1 -1
- package/utils/mergeProps.js +1 -1
- package/utils/mergedToString.js +1 -1
- package/utils/mutationObserver.js +1 -1
- package/utils/omit.js +1 -1
- package/utils/pad.js +1 -1
- package/utils/pick.js +1 -1
- package/utils/pinyin.js +1 -1
- package/utils/react19Adapter.js +2 -2
- package/utils/ref.js +41 -0
- package/utils/resizeObserver.js +1 -1
- package/utils/saveAs.js +1 -1
- package/utils/screenfull.js +1 -1
- package/utils/scrollIntoViewIfNeeded.js +1 -1
- package/utils/setCreateRoot.js +53 -0
- package/utils/setDarkTheme.js +1 -1
- package/utils/setDir.js +1 -1
- package/utils/setPrimaryColor.js +1 -1
- package/utils/setTheme.js +1 -1
- package/utils/string.js +1 -1
- package/utils/style.js +1 -1
- package/utils/throttleByRaf.js +1 -1
- package/utils/throttleByRaf2.js +1 -1
- package/utils/tinycolor.js +1 -1
- package/utils/toArray.js +9 -9
- package/utils/tree.js +1 -1
- package/utils/tween.js +1 -1
- package/utils/uuid.js +1 -1
- package/utils/validate.js +1 -1
- package/utils/warning.js +1 -1
- package/transition-group/utils/ChildMapping.js +0 -66
- package/types/utils/reactDOM.d.ts +0 -34
- package/types/utils/supportRef.d.ts +0 -3
- package/utils/reactDOM.js +0 -87
- package/utils/supportRef.js +0 -10
package/Development.js
CHANGED
package/Empty.js
CHANGED
package/Flex.js
CHANGED
package/Motion.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
|
+
import { default as t } from "./motion/CSSMotion.js";
|
|
3
|
+
import { default as f } from "./motion/CSSMotionList.js";
|
|
4
|
+
import { default as d } from "./motion/context.js";
|
|
5
|
+
export {
|
|
6
|
+
f as CSSMotionList,
|
|
7
|
+
d as Provider,
|
|
8
|
+
t as default
|
|
9
|
+
};
|
package/Progress.js
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
|
+
import "react";
|
|
3
|
+
import "./utils/toArray.js";
|
|
4
|
+
import "./utils/warning.js";
|
|
5
|
+
import "./resize-observer/Collection.js";
|
|
6
|
+
import "./resize-observer/SingleObserver.js";
|
|
7
|
+
import { default as f } from "./resize-observer/index.js";
|
|
8
|
+
export {
|
|
9
|
+
f as default
|
|
10
|
+
};
|
package/Space.js
CHANGED
package/SuspenseFallbackTest.js
CHANGED
package/TransitionGroup.js
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
/* 2025-11-
|
|
2
|
-
import
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
|
+
import "@unicom-cloud/utils/dom-helpers/canUseDOM";
|
|
3
|
+
import { default as r } from "@unicom-cloud/utils/dom-helpers/reflow";
|
|
3
4
|
import "./utils/is.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { default as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { default as
|
|
11
|
-
import {
|
|
5
|
+
import { getChildMapping as e, getInitialChildMapping as p, getNextChildMapping as s, mergeChildMappings as T } from "./transition-group/ChildMapping.js";
|
|
6
|
+
import { default as l } from "./transition-group/CSSTransition.js";
|
|
7
|
+
import { PqbCSSTransition as d } from "./transition-group/PqbCSSTransition.js";
|
|
8
|
+
import { default as E } from "./transition-group/ReplaceTransition.js";
|
|
9
|
+
import { default as G, modes as g } from "./transition-group/SwitchTransition.js";
|
|
10
|
+
import { ENTERED as x, ENTERING as M, EXITED as C, EXITING as R, UNMOUNTED as S, default as h } from "./transition-group/Transition.js";
|
|
11
|
+
import { default as D, default as A } from "./transition-group/TransitionGroup.js";
|
|
12
|
+
import { default as c } from "./transition-group/TransitionGroupContext.js";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
l as CSSTransition,
|
|
15
|
+
d as PqbCSSTransition,
|
|
16
|
+
E as ReplaceTransition,
|
|
17
|
+
G as SwitchTransition,
|
|
18
|
+
g as SwitchTransitionModes,
|
|
19
|
+
x as TRANSITION_ENTERED,
|
|
20
|
+
M as TRANSITION_ENTERING,
|
|
21
|
+
C as TRANSITION_EXITED,
|
|
22
|
+
R as TRANSITION_EXITING,
|
|
23
|
+
S as TRANSITION_UNMOUNTED,
|
|
24
|
+
h as Transition,
|
|
25
|
+
D as TransitionGroup,
|
|
26
|
+
c as TransitionGroupContext,
|
|
27
|
+
r as TransitionGroupForceReflow,
|
|
28
|
+
e as TransitionGroupGetChildMapping,
|
|
29
|
+
p as TransitionGroupGetInitialChildMapping,
|
|
30
|
+
s as TransitionGroupGetNextChildMapping,
|
|
31
|
+
T as TransitionGroupMergeChildMappings,
|
|
32
|
+
A as default
|
|
32
33
|
};
|
package/development/index.js
CHANGED
|
@@ -1,48 +1,59 @@
|
|
|
1
|
-
/* 2025-11-
|
|
2
|
-
import { jsx as
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
|
+
import { jsx as l, jsxs as v } from "react/jsx-runtime";
|
|
3
3
|
import C from "@unicom-cloud/icons/IconFluentFlatHourglassNotDone";
|
|
4
4
|
import s from "@unicom-cloud/utils/class-name";
|
|
5
|
-
import { UI_COMMON_PREFIX as
|
|
6
|
-
import { forwardRef as x, useMemo as b } from "react";
|
|
7
|
-
const
|
|
5
|
+
import { UI_COMMON_PREFIX as g } from "@unicom-cloud/utils/constant/ui";
|
|
6
|
+
import { forwardRef as x, useMemo as R, useRef as b, useImperativeHandle as D } from "react";
|
|
7
|
+
const I = (n, c) => {
|
|
8
8
|
const {
|
|
9
|
-
url:
|
|
9
|
+
url: o,
|
|
10
10
|
// 图片地址
|
|
11
|
-
imgClassName:
|
|
11
|
+
imgClassName: r,
|
|
12
12
|
// 图片自定义类名
|
|
13
|
-
icon:
|
|
13
|
+
icon: t,
|
|
14
14
|
// 自定义图标
|
|
15
|
-
iconClassName:
|
|
15
|
+
iconClassName: a,
|
|
16
16
|
// 图标自定义类名
|
|
17
|
-
tip:
|
|
17
|
+
tip: i,
|
|
18
18
|
// 高优先级提示文字
|
|
19
|
-
label:
|
|
19
|
+
label: p = "等待开发",
|
|
20
20
|
// 次要提示文字(默认值)
|
|
21
|
-
labelClassName:
|
|
21
|
+
labelClassName: u,
|
|
22
22
|
// 文字容器类名
|
|
23
|
-
className:
|
|
23
|
+
className: d
|
|
24
24
|
// 外层容器类名
|
|
25
|
-
} =
|
|
25
|
+
} = n, e = `${g}-development`, f = R(() => o ? /* @__PURE__ */ l(
|
|
26
26
|
"img",
|
|
27
27
|
{
|
|
28
|
-
className: s(`${e}-img`,
|
|
29
|
-
src:
|
|
28
|
+
className: s(`${e}-img`, r),
|
|
29
|
+
src: o,
|
|
30
30
|
alt: "开发预览图"
|
|
31
31
|
}
|
|
32
|
-
) :
|
|
32
|
+
) : t ?? /* @__PURE__ */ l(
|
|
33
33
|
C,
|
|
34
34
|
{
|
|
35
|
-
className: s(`${e}-icon`,
|
|
35
|
+
className: s(`${e}-icon`, a)
|
|
36
36
|
}
|
|
37
|
-
), [
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
|
|
37
|
+
), [o, e, r, t, a]), N = i ?? p, m = b(null);
|
|
38
|
+
return D(c, () => ({
|
|
39
|
+
getRootElement() {
|
|
40
|
+
return m.current;
|
|
41
|
+
}
|
|
42
|
+
})), /* @__PURE__ */ v(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
ref: m,
|
|
46
|
+
className: s(e, d),
|
|
47
|
+
children: [
|
|
48
|
+
f,
|
|
49
|
+
/* @__PURE__ */ l("div", { className: s(`${e}-label`, u), children: N })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}, M = x(
|
|
54
|
+
I
|
|
44
55
|
);
|
|
45
|
-
|
|
56
|
+
M.displayName = "Development";
|
|
46
57
|
export {
|
|
47
|
-
|
|
58
|
+
M as default
|
|
48
59
|
};
|
package/empty/index.js
CHANGED
|
@@ -1,52 +1,56 @@
|
|
|
1
|
-
/* 2025-11-
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
|
+
import { jsxs as g, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import $ from "@unicom-cloud/icons/IconUiEmpty";
|
|
4
4
|
import { UI_COMMON_PREFIX as N } from "@unicom-cloud/utils/constant/ui";
|
|
5
|
-
import { memo as x, forwardRef as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import { memo as x, forwardRef as E, useRef as C, useImperativeHandle as I } from "react";
|
|
6
|
+
import R from "../space/index.js";
|
|
7
|
+
import r from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import "../utils/is.js";
|
|
9
|
-
import { isString as
|
|
10
|
-
const
|
|
9
|
+
import { isString as h } from "@unicom-cloud/utils/is";
|
|
10
|
+
const j = (c, a) => {
|
|
11
11
|
const {
|
|
12
|
-
style:
|
|
13
|
-
className:
|
|
14
|
-
description:
|
|
12
|
+
style: p,
|
|
13
|
+
className: l,
|
|
14
|
+
description: n = "无数据",
|
|
15
15
|
// 默认描述文本
|
|
16
|
-
icon:
|
|
17
|
-
imgSrc:
|
|
18
|
-
prefixCls:
|
|
19
|
-
...
|
|
20
|
-
} =
|
|
16
|
+
icon: i,
|
|
17
|
+
imgSrc: m,
|
|
18
|
+
prefixCls: f,
|
|
19
|
+
...d
|
|
20
|
+
} = c, e = `${N}-empty`, t = f ?? e, u = h(n) ? n : "empty", y = () => m ? /* @__PURE__ */ o(
|
|
21
21
|
"img",
|
|
22
22
|
{
|
|
23
|
-
className:
|
|
24
|
-
alt:
|
|
25
|
-
src:
|
|
23
|
+
className: r(`${e}-img`, `${t}-img`),
|
|
24
|
+
alt: u,
|
|
25
|
+
src: m,
|
|
26
26
|
loading: "lazy"
|
|
27
27
|
}
|
|
28
|
-
) :
|
|
29
|
-
return
|
|
30
|
-
|
|
28
|
+
) : i ? /* @__PURE__ */ o("div", { className: r(`${e}-icon`, `${t}-icon`), children: i }) : /* @__PURE__ */ o($, { className: r(`${e}-icon`, `${t}-icon`) }), s = C(null);
|
|
29
|
+
return I(a, () => ({
|
|
30
|
+
getRootElement() {
|
|
31
|
+
return s.current;
|
|
32
|
+
}
|
|
33
|
+
})), /* @__PURE__ */ g(
|
|
34
|
+
R.Vertical,
|
|
31
35
|
{
|
|
32
|
-
ref:
|
|
33
|
-
className: e
|
|
34
|
-
style:
|
|
36
|
+
ref: s,
|
|
37
|
+
className: r(e, t, l),
|
|
38
|
+
style: p,
|
|
35
39
|
justifyContent: "center",
|
|
36
40
|
alignItems: "center",
|
|
37
41
|
gap: 5,
|
|
38
|
-
...
|
|
42
|
+
...d,
|
|
39
43
|
children: [
|
|
40
44
|
y(),
|
|
41
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ o("div", { className: r(`${e}-description`, `${t}-description`), children: n })
|
|
42
46
|
]
|
|
43
47
|
}
|
|
44
48
|
);
|
|
45
|
-
},
|
|
46
|
-
|
|
49
|
+
}, v = x(
|
|
50
|
+
E(j)
|
|
47
51
|
);
|
|
48
|
-
|
|
52
|
+
v.displayName = "Empty";
|
|
49
53
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
v as Empty,
|
|
55
|
+
v as default
|
|
52
56
|
};
|
package/flex/index.js
CHANGED
|
@@ -1,78 +1,84 @@
|
|
|
1
|
-
/* 2025-11-
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { UI_COMMON_PREFIX as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
3
|
+
import { UI_COMMON_PREFIX as R } from "@unicom-cloud/utils/constant/ui";
|
|
4
|
+
import { forwardRef as y, useRef as E, useImperativeHandle as M } from "react";
|
|
5
|
+
import P from "../hooks/use-merge-props/index.js";
|
|
6
|
+
import S from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import "../utils/is.js";
|
|
8
|
-
import { GAP_SIZE_MAP as
|
|
9
|
-
import { isBoolean as
|
|
10
|
-
function a(
|
|
11
|
-
if (t
|
|
8
|
+
import { GAP_SIZE_MAP as u } from "./interface.js";
|
|
9
|
+
import { isBoolean as V, isUndefined as $, isArray as _, isString as b } from "@unicom-cloud/utils/is";
|
|
10
|
+
function a(n, e, t) {
|
|
11
|
+
if ($(t))
|
|
12
12
|
return;
|
|
13
|
-
|
|
13
|
+
b(t) && Object.keys(u).includes(t) ? n[e] = u[t] : n[e] = t;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
15
|
+
function A(n = {}, e, t = "gap") {
|
|
16
|
+
return $(e) || (_(e) ? (a(n, "rowGap", e[0]), a(n, "columnGap", e[1] ?? e[0])) : a(n, t, e)), n;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const z = {
|
|
19
19
|
component: "div",
|
|
20
20
|
gap: "small"
|
|
21
|
-
},
|
|
22
|
-
const t =
|
|
21
|
+
}, m = y((n, e) => {
|
|
22
|
+
const t = P(n, z, {}), {
|
|
23
23
|
className: l,
|
|
24
|
-
style:
|
|
25
|
-
flex:
|
|
26
|
-
gap:
|
|
27
|
-
children:
|
|
24
|
+
style: w,
|
|
25
|
+
flex: F,
|
|
26
|
+
gap: C,
|
|
27
|
+
children: G,
|
|
28
28
|
direction: s,
|
|
29
29
|
justify: f,
|
|
30
30
|
align: p,
|
|
31
|
-
component:
|
|
32
|
-
wrap:
|
|
33
|
-
rtl:
|
|
31
|
+
component: I = "div",
|
|
32
|
+
wrap: c,
|
|
33
|
+
rtl: N,
|
|
34
34
|
inline: x,
|
|
35
|
-
...
|
|
36
|
-
} = t,
|
|
35
|
+
...O
|
|
36
|
+
} = t, r = `${R}-flex`, i = {
|
|
37
37
|
display: x ? "inline-flex" : "flex"
|
|
38
38
|
};
|
|
39
39
|
if ("wrap" in t) {
|
|
40
|
-
let
|
|
41
|
-
|
|
40
|
+
let o = c;
|
|
41
|
+
V(o) ? o = o ? "wrap" : "nowrap" : o = c, i.flexWrap = o;
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
"flex" in t && (i.flex = F), p && (i.alignItems = p), f && (i.justifyContent = f), s && (i.flexDirection = s), Object.assign(i, A({}, C), w);
|
|
44
|
+
const d = E(null);
|
|
45
|
+
return M(e, () => ({
|
|
46
|
+
getRootElement() {
|
|
47
|
+
return d.current;
|
|
48
|
+
}
|
|
49
|
+
})), /* @__PURE__ */ g(
|
|
50
|
+
I,
|
|
45
51
|
{
|
|
46
|
-
ref:
|
|
47
|
-
style:
|
|
48
|
-
className:
|
|
49
|
-
|
|
52
|
+
ref: d,
|
|
53
|
+
style: i,
|
|
54
|
+
className: S(
|
|
55
|
+
r,
|
|
50
56
|
{
|
|
51
|
-
[`${
|
|
52
|
-
[`${
|
|
57
|
+
[`${r}-rtl`]: N,
|
|
58
|
+
[`${r}-inline`]: x
|
|
53
59
|
},
|
|
54
|
-
!!s && `${
|
|
55
|
-
!!f && `${
|
|
56
|
-
!!p && `${
|
|
60
|
+
!!s && `${r}-flex-direction-${s}`,
|
|
61
|
+
!!f && `${r}-justify-content-${f}`,
|
|
62
|
+
!!p && `${r}-align-items-${p}`,
|
|
57
63
|
l
|
|
58
64
|
),
|
|
59
|
-
...
|
|
60
|
-
children:
|
|
65
|
+
...O,
|
|
66
|
+
children: G
|
|
61
67
|
}
|
|
62
68
|
);
|
|
63
69
|
});
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
(
|
|
67
|
-
const { direction: t = "column", ...l } =
|
|
68
|
-
return /* @__PURE__ */
|
|
70
|
+
m.displayName = "Flex";
|
|
71
|
+
const j = y(
|
|
72
|
+
(n, e) => {
|
|
73
|
+
const { direction: t = "column", ...l } = n;
|
|
74
|
+
return /* @__PURE__ */ g(m, { ...l, ref: e, direction: t });
|
|
69
75
|
}
|
|
70
76
|
);
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
Vertical:
|
|
77
|
+
j.displayName = "FlexVertical";
|
|
78
|
+
const k = Object.assign(m, {
|
|
79
|
+
Vertical: j
|
|
74
80
|
});
|
|
75
81
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
82
|
+
j as FlexVertical,
|
|
83
|
+
k as default
|
|
78
84
|
};
|
package/flex/interface.js
CHANGED
package/higher-order/index.js
CHANGED
|
@@ -1,81 +1,77 @@
|
|
|
1
|
-
/* 2025-11-
|
|
2
|
-
import { jsx as
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
3
3
|
import P from "@unicom-cloud/icons/IconUiMute";
|
|
4
4
|
import U from "@unicom-cloud/icons/IconUiPauseCircleFill";
|
|
5
5
|
import b from "@unicom-cloud/icons/IconUiPlayCircleFill";
|
|
6
6
|
import N from "@unicom-cloud/icons/IconUiSound";
|
|
7
|
-
import { forwardRef as v, useState as
|
|
8
|
-
const T = (
|
|
9
|
-
const d = v((
|
|
10
|
-
const { useButton:
|
|
7
|
+
import { forwardRef as v, useState as k, useMemo as E, useCallback as c, useEffect as F, useImperativeHandle as M, memo as R } from "react";
|
|
8
|
+
const T = (u) => {
|
|
9
|
+
const d = v((x, g) => {
|
|
10
|
+
const { useButton: C = !0, buttonProps: h = {}, ...s } = x, [l, o] = k(!1), [a, S] = k(
|
|
11
11
|
null
|
|
12
12
|
), e = E(
|
|
13
13
|
() => "speechSynthesis" in window && "SpeechSynthesisUtterance" in window,
|
|
14
14
|
[]
|
|
15
|
-
),
|
|
16
|
-
e && (window.speechSynthesis.cancel(),
|
|
17
|
-
}, [e]),
|
|
15
|
+
), i = c(() => {
|
|
16
|
+
e && (window.speechSynthesis.cancel(), o(!1), S(null));
|
|
17
|
+
}, [e]), f = c(() => {
|
|
18
18
|
if (!e) return;
|
|
19
|
-
|
|
19
|
+
i();
|
|
20
20
|
const n = s.getText?.() ?? s.text;
|
|
21
21
|
if (!n) return;
|
|
22
22
|
const t = new SpeechSynthesisUtterance(n);
|
|
23
|
-
|
|
23
|
+
S(t);
|
|
24
24
|
const r = () => {
|
|
25
|
-
|
|
25
|
+
o(!1), S(null);
|
|
26
26
|
};
|
|
27
|
-
t.onstart = () =>
|
|
27
|
+
t.onstart = () => o(!0), t.onend = r, t.onerror = r, t.onpause = () => o(!1), t.onresume = () => o(!0);
|
|
28
28
|
try {
|
|
29
29
|
window.speechSynthesis.speak(t);
|
|
30
30
|
} catch (y) {
|
|
31
31
|
console.error("Speech synthesis failed:", y), r();
|
|
32
32
|
}
|
|
33
|
-
}, [
|
|
33
|
+
}, [i, e, s.getText, s.text]), m = c(() => {
|
|
34
34
|
e && a && window.speechSynthesis.pause();
|
|
35
|
-
}, [e, a]),
|
|
35
|
+
}, [e, a]), I = c(() => {
|
|
36
36
|
e && a && window.speechSynthesis.resume();
|
|
37
|
-
}, [e, a]),
|
|
37
|
+
}, [e, a]), w = c(
|
|
38
38
|
(n) => {
|
|
39
|
-
n.preventDefault(), n.stopPropagation(), l ?
|
|
39
|
+
n.preventDefault(), n.stopPropagation(), l ? m() : f(), h.onClick?.(n);
|
|
40
40
|
},
|
|
41
|
-
[l,
|
|
41
|
+
[l, m, f, h.onClick]
|
|
42
42
|
);
|
|
43
|
-
if (F(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
resume: w
|
|
50
|
-
}),
|
|
51
|
-
[o, p, u, w]
|
|
52
|
-
), M(() => o, [o]), !e)
|
|
43
|
+
if (F(() => i, [i]), M(g, () => ({
|
|
44
|
+
cancel: i,
|
|
45
|
+
speak: f,
|
|
46
|
+
pause: m,
|
|
47
|
+
resume: I
|
|
48
|
+
})), !e)
|
|
53
49
|
return null;
|
|
54
|
-
if (
|
|
55
|
-
const { label: n, text: t, children: r, ...y } =
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
|
|
50
|
+
if (C) {
|
|
51
|
+
const { label: n, text: t, children: r, ...y } = h;
|
|
52
|
+
return /* @__PURE__ */ p(
|
|
53
|
+
u,
|
|
58
54
|
{
|
|
59
55
|
...s,
|
|
60
56
|
type: "text",
|
|
61
57
|
size: "mini",
|
|
62
|
-
icon: l ? /* @__PURE__ */
|
|
58
|
+
icon: l ? /* @__PURE__ */ p(P, {}) : /* @__PURE__ */ p(N, {}),
|
|
63
59
|
...y,
|
|
64
|
-
onClick:
|
|
60
|
+
onClick: w,
|
|
65
61
|
children: n || t || r
|
|
66
62
|
}
|
|
67
63
|
);
|
|
68
64
|
}
|
|
69
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ p(
|
|
70
66
|
l ? U : b,
|
|
71
67
|
{
|
|
72
68
|
...s.iconProps,
|
|
73
|
-
onClick:
|
|
69
|
+
onClick: w,
|
|
74
70
|
style: { cursor: "pointer" }
|
|
75
71
|
}
|
|
76
72
|
);
|
|
77
73
|
});
|
|
78
|
-
return d.displayName = `WithSpeechSynthesis.${
|
|
74
|
+
return d.displayName = `WithSpeechSynthesis.${u.displayName || u.name || "SpeechSynthesis"}`, R(d);
|
|
79
75
|
};
|
|
80
76
|
T.displayName = "withSpeechSynthesis";
|
|
81
77
|
export {
|