@unicom-cloud/ui-common 0.1.13 → 0.1.15
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 +1 -1
- package/Progress.js +1 -1
- package/ResizeObserver.js +1 -1
- package/Space.js +1 -1
- package/SuspenseFallbackTest.js +1 -1
- package/Timer.js +1 -1
- package/TransitionGroup.js +1 -1
- package/development/index.js +1 -1
- package/empty/index.js +1 -1
- package/flex/index.js +1 -1
- package/flex/utils.js +14 -13
- package/higher-order/index.js +1 -1
- package/higher-order/with-speech-synthesis/index.js +1 -1
- 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 +1 -1
- package/hooks/use-async-effect/index.js +1 -1
- package/hooks/use-boolean/index.js +1 -1
- package/hooks/use-click-away/index.js +1 -1
- package/hooks/use-computed-state/index.js +1 -1
- package/hooks/use-controllable-value/index.js +1 -1
- package/hooks/use-cookie-state/index.js +1 -1
- package/hooks/use-count-down/index.js +1 -1
- 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 +1 -1
- package/hooks/use-drop/index.js +1 -1
- package/hooks/use-event/index.js +1 -1
- package/hooks/use-event-listener/index.js +1 -1
- package/hooks/use-event-target/index.js +1 -1
- 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 +1 -1
- package/hooks/use-get-state/index.js +1 -1
- package/hooks/use-history-travel/index.js +1 -1
- 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 +1 -1
- package/hooks/use-infinite-scroll/index.js +1 -1
- package/hooks/use-intersection-observer/index.js +1 -1
- package/hooks/use-intersection-observers/index.js +1 -1
- package/hooks/use-interval/index.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/hooks/use-map/index.js +1 -1
- package/hooks/use-media/index.js +1 -1
- package/hooks/use-memo/index.js +1 -1
- package/hooks/use-memoized-fn/index.js +4 -4
- package/hooks/use-merge-props/index.js +1 -1
- package/hooks/use-merge-value/index.js +13 -13
- package/hooks/use-mobile/index.js +1 -1
- package/hooks/use-mount/index.js +1 -1
- package/hooks/use-mouse/index.js +1 -1
- package/hooks/use-move/index.js +1 -1
- package/hooks/use-mutation-observer/index.js +1 -1
- package/hooks/use-mutation-observers/index.js +5 -4
- 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 +1 -1
- package/hooks/use-pagination/index.js +1 -1
- package/hooks/use-paste-image/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 +1 -1
- package/hooks/use-raf-state/index.js +1 -1
- package/hooks/use-raf-timeout/index.js +1 -1
- package/hooks/use-reactive/index.js +1 -1
- package/hooks/use-ref-latest/index.js +1 -1
- package/hooks/use-refs/index.js +1 -1
- 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 +1 -1
- package/hooks/use-request/src/plugins/useDebouncePlugin.js +1 -1
- package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +1 -1
- package/hooks/use-request/src/plugins/usePollingPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useRetryPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useThrottlePlugin.js +1 -1
- package/hooks/use-request/src/useRequest.js +1 -1
- package/hooks/use-request/src/useRequestImplement.js +1 -1
- 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 +1 -1
- package/hooks/use-resize-observer/index.js +1 -1
- package/hooks/use-resize-observers/index.js +5 -4
- package/hooks/use-responsive/index.js +1 -1
- package/hooks/use-safe-state/index.js +1 -1
- 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 +1 -1
- package/hooks/use-state-callback/index.js +1 -1
- package/hooks/use-state-with-promise/index.js +1 -1
- package/hooks/use-sync-state/index.js +1 -1
- package/hooks/use-text-selection/index.js +1 -1
- 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 +1 -1
- package/hooks/use-timeout/index.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/hooks/use-virtual-list/index.js +1 -1
- package/hooks/use-watch/index.js +1 -1
- package/hooks/use-web-socket/index.js +1 -1
- package/hooks/use-why-did-you-update/index.js +1 -1
- package/hooks/use-window-size/index.js +1 -1
- package/hooks/useAsyncEffect.js +1 -1
- package/hooks/useBoolean.js +1 -1
- package/hooks/useClickAway.js +1 -1
- 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 +1 -1
- package/hooks/useEventListener.js +1 -1
- 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 +1 -1
- package/hooks/useInfiniteScroll.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useIntersectionObservers.js +1 -1
- 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 +1 -1
- package/hooks/useMemoizedFn.js +1 -1
- package/hooks/useMergeProps.js +1 -1
- package/hooks/useMergeValue.js +2 -2
- package/hooks/useMobile.js +1 -1
- package/hooks/useMount.js +1 -1
- package/hooks/useMouse.js +1 -1
- package/hooks/useMove.js +1 -1
- package/hooks/useMutationObserver.js +1 -1
- package/hooks/useMutationObservers.js +5 -4
- package/hooks/useNetwork.js +1 -1
- package/hooks/useOnlineStatus.js +1 -1
- package/hooks/useOverflowHidden.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/usePagination.js +1 -1
- package/hooks/usePasteImage.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 +5 -4
- 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 +1 -1
- package/hooks/useStateCallback.js +1 -1
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useSyncState.js +1 -1
- 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 +1 -1
- package/hooks/utils/createEffectWithTarget.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/icons/file.js +1 -1
- package/index.js +432 -444
- package/motion/CSSMotion.js +1 -1
- package/motion/CSSMotionList.js +1 -1
- package/motion/context.js +1 -1
- package/motion/hooks/useDomMotionEvents.js +1 -1
- package/motion/hooks/useNextFrame.js +1 -1
- package/motion/hooks/useStatus.js +1 -1
- package/motion/hooks/useStepQueue.js +1 -1
- package/motion/index.js +1 -1
- package/motion/interface.js +1 -1
- package/motion/util/diff.js +1 -1
- package/motion/util/motion.js +1 -1
- package/package.json +1 -1
- package/progress/index.js +1 -1
- package/resize-observer/Collection.js +1 -1
- package/resize-observer/SingleObserver.js +1 -1
- package/resize-observer/index.js +1 -1
- package/resize-observer/observerUtil.js +1 -1
- package/space/index.js +1 -1
- package/suspense-fallback-test/index.js +1 -1
- package/timer/index.js +1 -1
- package/transition-group/CSSTransition.js +1 -1
- package/transition-group/ChildMapping.js +1 -1
- package/transition-group/PqbCSSTransition.js +1 -1
- package/transition-group/ReplaceTransition.js +1 -1
- package/transition-group/SwitchTransition.js +1 -1
- package/transition-group/Transition.js +30 -34
- package/transition-group/TransitionGroup.js +1 -1
- package/transition-group/TransitionGroupContext.js +1 -1
- package/transition-group/index.js +1 -1
- package/types/flex/interface.d.ts +1 -1
- package/types/hooks/use-cookie-state/index.d.ts +1 -1
- package/types/hooks/use-counter/index.d.ts +3 -3
- package/types/hooks/use-history-travel/index.d.ts +2 -2
- package/types/hooks/use-map/index.d.ts +4 -4
- package/types/hooks/use-memoized-fn/index.d.ts +1 -1
- package/types/hooks/use-selections/index.d.ts +3 -3
- package/types/hooks/use-set/index.d.ts +2 -2
- package/types/hooks/use-set-state/index.d.ts +2 -2
- package/types/hooks/use-theme/index.d.ts +1 -1
- package/types/hooks/use-url-state/index.d.ts +1 -2
- package/types/hooks/use-virtual-list/index.d.ts +1 -1
- package/types/motion/context.d.ts +1 -1
- package/types/resize-observer/Collection.d.ts +1 -1
- package/types/transition-group/CSSTransition.d.ts +1 -1
- package/types/transition-group/PqbCSSTransition.d.ts +1 -1
- package/types/transition-group/ReplaceTransition.d.ts +1 -1
- package/types/transition-group/SwitchTransition.d.ts +1 -1
- package/types/transition-group/Transition.d.ts +1 -1
- package/types/transition-group/TransitionGroup.d.ts +1 -1
- package/types/utils/className.d.ts +1 -1
- package/types/utils/scrollIntoViewIfNeeded.d.ts +2 -11
- package/types/utils/string.d.ts +2 -1
- package/utils/callOrReturn.js +1 -1
- package/utils/callbackOriginRef.js +1 -1
- package/utils/caseName.js +1 -1
- package/utils/className.js +4 -3
- 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 +1 -1
- package/utils/emitter.js +1 -1
- package/utils/fileRead.js +1 -1
- package/utils/fileToDataURL.js +1 -1
- package/utils/fillNBSP.js +1 -1
- package/utils/findRootElement.js +1 -1
- package/utils/findScrollParent.js +1 -1
- package/utils/getHighlightText.js +15 -17
- package/utils/getHotkeyHandler.js +1 -1
- package/utils/getStringLength.js +1 -1
- package/utils/include.js +1 -1
- package/utils/index.js +332 -344
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.js +1 -1
- package/utils/keyboardCode.js +1 -1
- package/utils/lodash.js +1 -1
- 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 +1 -1
- package/utils/ref.js +1 -1
- package/utils/resizeObserver.js +1 -1
- package/utils/saveAs.js +1 -1
- package/utils/screenfull.js +1 -1
- package/utils/scrollIntoViewIfNeeded.js +5 -72
- package/utils/setCreateRoot.js +1 -1
- 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 +3 -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 +1 -1
- 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/types/utils/compute.d.ts +0 -100
- package/utils/compute.js +0 -142
package/motion/CSSMotion.js
CHANGED
package/motion/CSSMotionList.js
CHANGED
package/motion/context.js
CHANGED
package/motion/index.js
CHANGED
package/motion/interface.js
CHANGED
package/motion/util/diff.js
CHANGED
package/motion/util/motion.js
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/ui-common","version":"0.1.
|
|
1
|
+
{"name":"@unicom-cloud/ui-common","version":"0.1.15","dependencies":{"@unicom-cloud/utils":"^0.1.0","@unicom-cloud/icons":"^0.1.0"},"peerDependencies":{"dayjs":"^1.11.19","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1","react-is":"^18.3.1"},"type":"module","types":"types/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|
package/progress/index.js
CHANGED
package/resize-observer/index.js
CHANGED
package/space/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2026-01-
|
|
1
|
+
/* 2026-01-27 10:43:58 */
|
|
2
2
|
import { jsx as o, jsxs as k } from "react/jsx-runtime";
|
|
3
3
|
import { UI_COMMON_PREFIX as H } from "@unicom-cloud/utils/constant/ui";
|
|
4
4
|
import { forwardRef as g, useRef as O, useImperativeHandle as _, Fragment as A } from "react";
|
package/timer/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2026-01-
|
|
1
|
+
/* 2026-01-27 10:43:58 */
|
|
2
2
|
import { jsx as S } from "react/jsx-runtime";
|
|
3
3
|
import h from "react";
|
|
4
4
|
import { NOOP as a } from "../utils/constant.js";
|
|
@@ -8,9 +8,9 @@ import T from "@unicom-cloud/utils/dom-helpers/reflow";
|
|
|
8
8
|
import "../utils/is.js";
|
|
9
9
|
import { findRootElement as x } from "../utils/findRootElement.js";
|
|
10
10
|
import d from "./TransitionGroupContext.js";
|
|
11
|
-
import { isFunction as
|
|
12
|
-
const
|
|
13
|
-
class
|
|
11
|
+
import { isFunction as g } from "@unicom-cloud/utils/is";
|
|
12
|
+
const p = "unmounted", o = "exited", r = "entering", l = "entered", m = "exiting";
|
|
13
|
+
class u extends h.Component {
|
|
14
14
|
static {
|
|
15
15
|
this.contextType = d;
|
|
16
16
|
}
|
|
@@ -18,13 +18,13 @@ class p extends h.Component {
|
|
|
18
18
|
super(t, e);
|
|
19
19
|
const n = e, s = n && !n.isMounting ? t.enter : t.appear;
|
|
20
20
|
let i;
|
|
21
|
-
this.appearStatus = null, t.in ? s ? (i = o, this.appearStatus = r) : i = l : t.unmountOnExit || t.mountOnEnter ? i =
|
|
21
|
+
this.appearStatus = null, t.in ? s ? (i = o, this.appearStatus = r) : i = l : t.unmountOnExit || t.mountOnEnter ? i = p : i = o, this.state = { status: i }, this.nextCallback = null;
|
|
22
22
|
}
|
|
23
23
|
getElement() {
|
|
24
24
|
return x(this.props.refElement) || x(this);
|
|
25
25
|
}
|
|
26
26
|
static getDerivedStateFromProps({ in: t }, e) {
|
|
27
|
-
return t && e.status ===
|
|
27
|
+
return t && e.status === p ? { status: o } : null;
|
|
28
28
|
}
|
|
29
29
|
// getSnapshotBeforeUpdate(prevProps) {
|
|
30
30
|
// let nextStatus = null
|
|
@@ -71,10 +71,10 @@ class p extends h.Component {
|
|
|
71
71
|
this.performEnter(t);
|
|
72
72
|
} else
|
|
73
73
|
this.performExit();
|
|
74
|
-
else this.props.unmountOnExit && this.state.status === o && this.setState({ status:
|
|
74
|
+
else this.props.unmountOnExit && this.state.status === o && this.setState({ status: p });
|
|
75
75
|
}
|
|
76
76
|
performEnter(t) {
|
|
77
|
-
const { enter: e } = this.props, n = this.context ? this.context.isMounting : t, [s, i] = [this.getElement(), n],
|
|
77
|
+
const { enter: e } = this.props, n = this.context ? this.context.isMounting : t, [s, i] = [this.getElement(), n], E = this.getTimeouts(), c = n ? E.appear : E.enter;
|
|
78
78
|
if (!t && !e) {
|
|
79
79
|
this.safeSetState({ status: l }, () => {
|
|
80
80
|
this.props.onEntered(s);
|
|
@@ -121,20 +121,16 @@ class p extends h.Component {
|
|
|
121
121
|
}
|
|
122
122
|
onTransitionEnd(t, e) {
|
|
123
123
|
this.setNextCallback(e);
|
|
124
|
-
const n = this.getElement(), s = t == null && !
|
|
125
|
-
if (!n ||
|
|
124
|
+
const n = this.getElement(), s = this.props.addEndListener, i = t == null && !s;
|
|
125
|
+
if (!n || i) {
|
|
126
126
|
setTimeout(this.nextCallback, 0);
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
const [i, u] = [n, this.nextCallback];
|
|
131
|
-
this.props.addEndListener(i, u);
|
|
132
|
-
}
|
|
133
|
-
t != null && setTimeout(this.nextCallback, t);
|
|
129
|
+
s && s(n, this.nextCallback), t != null && setTimeout(this.nextCallback, t);
|
|
134
130
|
}
|
|
135
131
|
render() {
|
|
136
132
|
const t = this.state.status;
|
|
137
|
-
if (t ===
|
|
133
|
+
if (t === p)
|
|
138
134
|
return null;
|
|
139
135
|
const {
|
|
140
136
|
children: e,
|
|
@@ -142,27 +138,27 @@ class p extends h.Component {
|
|
|
142
138
|
in: n,
|
|
143
139
|
mountOnEnter: s,
|
|
144
140
|
unmountOnExit: i,
|
|
145
|
-
appear:
|
|
141
|
+
appear: E,
|
|
146
142
|
enter: c,
|
|
147
|
-
exit:
|
|
148
|
-
timeout:
|
|
149
|
-
addEndListener:
|
|
150
|
-
onEnter:
|
|
143
|
+
exit: N,
|
|
144
|
+
timeout: b,
|
|
145
|
+
addEndListener: O,
|
|
146
|
+
onEnter: k,
|
|
151
147
|
onEntering: _,
|
|
152
148
|
onEntered: D,
|
|
153
|
-
onExit:
|
|
154
|
-
onExiting:
|
|
155
|
-
onExited:
|
|
156
|
-
refElement:
|
|
149
|
+
onExit: I,
|
|
150
|
+
onExiting: v,
|
|
151
|
+
onExited: R,
|
|
152
|
+
refElement: y,
|
|
157
153
|
...f
|
|
158
154
|
} = this.props;
|
|
159
155
|
return (
|
|
160
156
|
// allows for nested Transitions
|
|
161
|
-
/* @__PURE__ */ S(d.Provider, { value: null, children:
|
|
157
|
+
/* @__PURE__ */ S(d.Provider, { value: null, children: g(e) ? e(t, f) : h.cloneElement(h.Children.only(e), f) })
|
|
162
158
|
);
|
|
163
159
|
}
|
|
164
160
|
}
|
|
165
|
-
|
|
161
|
+
u.defaultProps = {
|
|
166
162
|
in: !1,
|
|
167
163
|
mountOnEnter: !1,
|
|
168
164
|
unmountOnExit: !1,
|
|
@@ -177,16 +173,16 @@ p.defaultProps = {
|
|
|
177
173
|
onExiting: a,
|
|
178
174
|
onExited: a
|
|
179
175
|
};
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
176
|
+
u.UNMOUNTED = p;
|
|
177
|
+
u.EXITED = o;
|
|
178
|
+
u.ENTERING = r;
|
|
179
|
+
u.ENTERED = l;
|
|
180
|
+
u.EXITING = m;
|
|
185
181
|
export {
|
|
186
182
|
l as ENTERED,
|
|
187
183
|
r as ENTERING,
|
|
188
184
|
o as EXITED,
|
|
189
185
|
m as EXITING,
|
|
190
|
-
|
|
191
|
-
|
|
186
|
+
p as UNMOUNTED,
|
|
187
|
+
u as default
|
|
192
188
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type GapProperty = 'gap' | 'rowGap' | 'columnGap';
|
|
3
|
-
export type SizeType = 'mini' | 'small' | 'medium' | 'large' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | 'x1' | 'x2' | 'x3' | 'x4' | 'x5' | 'x6' | 'x7' | 'x8' | 'x9';
|
|
3
|
+
export type SizeType = 'default' | 'mini' | 'small' | 'medium' | 'large' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | 'x1' | 'x2' | 'x3' | 'x4' | 'x5' | 'x6' | 'x7' | 'x8' | 'x9';
|
|
4
4
|
export type GapType = SizeType | React.CSSProperties['gap'];
|
|
5
5
|
/**
|
|
6
6
|
* @title Flex
|
|
@@ -3,5 +3,5 @@ export type State = string | undefined;
|
|
|
3
3
|
export interface Options extends Cookies.CookieAttributes {
|
|
4
4
|
defaultValue?: State | (() => State);
|
|
5
5
|
}
|
|
6
|
-
declare function useCookieState(cookieKey: string, options?: Options): readonly [State, (this: unknown,
|
|
6
|
+
declare function useCookieState(cookieKey: string, options?: Options): readonly [State, (this: unknown, ...args: unknown[]) => unknown];
|
|
7
7
|
export default useCookieState;
|
|
@@ -10,9 +10,9 @@ export interface Actions {
|
|
|
10
10
|
}
|
|
11
11
|
export type ValueParam = number | ((c: number) => number);
|
|
12
12
|
declare function useCounter(initialValue?: number, options?: Options): readonly [number, {
|
|
13
|
-
readonly inc: (this: unknown,
|
|
14
|
-
readonly dec: (this: unknown,
|
|
15
|
-
readonly set: (this: unknown,
|
|
13
|
+
readonly inc: (this: unknown, ...args: unknown[]) => unknown;
|
|
14
|
+
readonly dec: (this: unknown, ...args: unknown[]) => unknown;
|
|
15
|
+
readonly set: (this: unknown, ...args: unknown[]) => unknown;
|
|
16
16
|
readonly reset: (this: unknown) => void;
|
|
17
17
|
}];
|
|
18
18
|
export default useCounter;
|
|
@@ -2,8 +2,8 @@ export default function useHistoryTravel<T>(initialValue?: T, maxLength?: number
|
|
|
2
2
|
value: T | undefined;
|
|
3
3
|
backLength: number;
|
|
4
4
|
forwardLength: number;
|
|
5
|
-
setValue: (this: unknown,
|
|
6
|
-
go: (this: unknown,
|
|
5
|
+
setValue: (this: unknown, ...args: unknown[]) => unknown;
|
|
6
|
+
go: (this: unknown, ...args: unknown[]) => unknown;
|
|
7
7
|
back: (this: unknown) => void;
|
|
8
8
|
forward: (this: unknown) => void;
|
|
9
9
|
reset: (this: unknown, ...args: any[]) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare function useMap<K, T>(initialValue?: Iterable<readonly [K, T]>): readonly [Map<K, T>, {
|
|
2
|
-
readonly set: (this: unknown,
|
|
3
|
-
readonly setAll: (this: unknown,
|
|
4
|
-
readonly remove: (this: unknown,
|
|
2
|
+
readonly set: (this: unknown, ...args: unknown[]) => unknown;
|
|
3
|
+
readonly setAll: (this: unknown, ...args: unknown[]) => unknown;
|
|
4
|
+
readonly remove: (this: unknown, ...args: unknown[]) => unknown;
|
|
5
5
|
readonly reset: (this: unknown) => void;
|
|
6
|
-
readonly get: (this: unknown,
|
|
6
|
+
readonly get: (this: unknown, ...args: unknown[]) => unknown;
|
|
7
7
|
}];
|
|
8
8
|
export default useMap;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type noop = (this:
|
|
1
|
+
type noop = (this: unknown, ...args: unknown[]) => unknown;
|
|
2
2
|
type PickFunction<T extends noop> = (this: ThisParameterType<T>, ...args: Parameters<T>) => ReturnType<T>;
|
|
3
3
|
declare const useMemoizedFn: <T extends noop>(fn: T) => PickFunction<T>;
|
|
4
4
|
export default useMemoizedFn;
|
|
@@ -10,9 +10,9 @@ declare function useSelections<T>(items: T[], options?: T[] | Options<T>): {
|
|
|
10
10
|
readonly partiallySelected: boolean;
|
|
11
11
|
readonly setSelected: React.Dispatch<React.SetStateAction<T[]>>;
|
|
12
12
|
readonly isSelected: (item: T) => boolean;
|
|
13
|
-
readonly select: (this: unknown,
|
|
14
|
-
readonly unSelect: (this: unknown,
|
|
15
|
-
readonly toggle: (this: unknown,
|
|
13
|
+
readonly select: (this: unknown, ...args: unknown[]) => unknown;
|
|
14
|
+
readonly unSelect: (this: unknown, ...args: unknown[]) => unknown;
|
|
15
|
+
readonly toggle: (this: unknown, ...args: unknown[]) => unknown;
|
|
16
16
|
readonly selectAll: (this: unknown) => void;
|
|
17
17
|
readonly unSelectAll: (this: unknown) => void;
|
|
18
18
|
readonly clearAll: (this: unknown) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare function useSet<K>(initialValue?: Iterable<K>): readonly [Set<K>, {
|
|
2
|
-
readonly add: (this: unknown,
|
|
3
|
-
readonly remove: (this: unknown,
|
|
2
|
+
readonly add: (this: unknown, ...args: unknown[]) => unknown;
|
|
3
|
+
readonly remove: (this: unknown, ...args: unknown[]) => unknown;
|
|
4
4
|
readonly reset: (this: unknown) => void;
|
|
5
5
|
}];
|
|
6
6
|
export default useSet;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type SetState<S extends Record<string,
|
|
2
|
-
declare const useSetState: <S extends Record<string,
|
|
1
|
+
export type SetState<S extends Record<string, unknown>> = <K extends keyof S>(state: Pick<S, K> | null | ((prevState: Readonly<S>) => Pick<S, K> | S | null)) => void;
|
|
2
|
+
declare const useSetState: <S extends Record<string, unknown>>(initialState: S | (() => S)) => [S, SetState<S>];
|
|
3
3
|
export default useSetState;
|
|
@@ -11,6 +11,6 @@ type Options = {
|
|
|
11
11
|
export default function useTheme(options?: Options): {
|
|
12
12
|
theme: ThemeType;
|
|
13
13
|
themeMode: "light" | "dark" | "system";
|
|
14
|
-
setThemeMode: (this: unknown,
|
|
14
|
+
setThemeMode: (this: unknown, ...args: unknown[]) => unknown;
|
|
15
15
|
};
|
|
16
16
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ParseOptions, StringifyOptions } from '@unicom-cloud/utils/query-string';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
export interface Options {
|
|
4
3
|
navigateMode?: 'push' | 'replace';
|
|
5
4
|
parseOptions?: ParseOptions;
|
|
6
5
|
stringifyOptions?: StringifyOptions;
|
|
7
6
|
}
|
|
8
7
|
type UrlState = Record<string, any>;
|
|
9
|
-
declare const useUrlState: <S extends UrlState = UrlState>(baseState?: S | (() => S), options?: Options) => readonly [Partial<{ [key in keyof S]: Required<S>[key] extends any[] ? string[] : string; }>, (this: unknown,
|
|
8
|
+
declare const useUrlState: <S extends UrlState = UrlState>(baseState?: S | (() => S), options?: Options) => readonly [Partial<{ [key in keyof S]: Required<S>[key] extends any[] ? string[] : string; }>, (this: unknown, ...args: unknown[]) => unknown];
|
|
10
9
|
export default useUrlState;
|
|
@@ -9,5 +9,5 @@ export interface Options<T> {
|
|
|
9
9
|
declare const useVirtualList: <T = any>(list: T[], options: Options<T>) => readonly [{
|
|
10
10
|
index: number;
|
|
11
11
|
data: T;
|
|
12
|
-
}[], (this: unknown,
|
|
12
|
+
}[], (this: unknown, ...args: unknown[]) => unknown];
|
|
13
13
|
export default useVirtualList;
|
|
@@ -5,5 +5,5 @@ interface MotionContextProps {
|
|
|
5
5
|
export declare const Context: React.Context<MotionContextProps>;
|
|
6
6
|
export default function MotionProvider({ children, ...props }: MotionContextProps & {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
-
}):
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -5,5 +5,5 @@ export declare const CollectionContext: React.Context<onCollectionResize>;
|
|
|
5
5
|
/**
|
|
6
6
|
* Collect all the resize event from children ResizeObserver
|
|
7
7
|
*/
|
|
8
|
-
export declare function Collection({ children, onBatchResize }: CollectionProps):
|
|
8
|
+
export declare function Collection({ children, onBatchResize }: CollectionProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -92,6 +92,6 @@ declare class CSSTransition extends React.Component {
|
|
|
92
92
|
};
|
|
93
93
|
addClass(element: any, type: any, phase: any): void;
|
|
94
94
|
removeClasses(element: any, type: any): void;
|
|
95
|
-
render():
|
|
95
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
96
96
|
}
|
|
97
97
|
export default CSSTransition;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import CSSTransition from './CSSTransition';
|
|
2
|
-
declare function PqbCSSTransition(props: CSSTransition): import("react").JSX.Element;
|
|
2
|
+
declare function PqbCSSTransition(props: CSSTransition): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export { PqbCSSTransition };
|
|
4
4
|
export default PqbCSSTransition;
|
|
@@ -18,6 +18,6 @@ declare class ReplaceTransition extends React.Component {
|
|
|
18
18
|
handleExiting: (...args: any[]) => void;
|
|
19
19
|
handleExited: (...args: any[]) => void;
|
|
20
20
|
handleLifecycle(handler: any, idx: any, originalArgs: any): void;
|
|
21
|
-
render():
|
|
21
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
}
|
|
23
23
|
export default ReplaceTransition;
|
|
@@ -83,6 +83,6 @@ declare class SwitchTransition extends React.Component {
|
|
|
83
83
|
status?: undefined;
|
|
84
84
|
};
|
|
85
85
|
changeState: (status: any, current?: null) => void;
|
|
86
|
-
render():
|
|
86
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
87
87
|
}
|
|
88
88
|
export default SwitchTransition;
|
|
@@ -125,6 +125,6 @@ declare class Transition extends React.Component {
|
|
|
125
125
|
safeSetState(nextState: any, callback: any): void;
|
|
126
126
|
setNextCallback(callback: any): any;
|
|
127
127
|
onTransitionEnd(timeout: any, handler: any): void;
|
|
128
|
-
render():
|
|
128
|
+
render(): import("react/jsx-runtime").JSX.Element | null;
|
|
129
129
|
}
|
|
130
130
|
export default Transition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as className, default } from '@unicom-cloud/utils/class-name';
|
|
1
|
+
export { default as className, default as cs, default, } from '@unicom-cloud/utils/class-name';
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare const isStandardScrollBehavior: (options: unknown) => options is StandardBehaviorOptions;
|
|
4
|
-
declare const isCustomScrollBehavior: <T = unknown>(options: unknown) => options is CustomBehaviorOptions<T>;
|
|
5
|
-
declare const getOptions: (options: unknown) => StandardBehaviorOptions;
|
|
6
|
-
declare const isInDocument: (element: Node) => boolean;
|
|
7
|
-
declare function scrollIntoView<T = unknown>(target: Element, options?: StandardBehaviorOptions | CustomBehaviorOptions<T> | boolean): T | void;
|
|
8
|
-
declare function scrollIntoViewNative(target: Element, options?: boolean | ScrollIntoViewOptions): void;
|
|
9
|
-
declare function scrollIntoViewIfNeeded(node: HTMLElement, options?: Options): void;
|
|
10
|
-
export { alignNearest, canOverflow, compute, getFrameElement, getOptions, getParentElement, getScrollMargins, isCustomScrollBehavior, isHiddenByFrame, isInDocument, isScrollable, isStandardScrollBehavior, scrollIntoView, scrollIntoViewIfNeeded, scrollIntoViewNative, };
|
|
1
|
+
declare function scrollIntoViewIfNeeded(node: HTMLElement, options?: boolean | ScrollIntoViewOptions): void;
|
|
2
|
+
export { scrollIntoViewIfNeeded };
|
|
11
3
|
export default scrollIntoViewIfNeeded;
|
|
12
|
-
export type { BaseOptions, CustomBehaviorOptions, CustomScrollAction, CustomScrollBehaviorCallback, CustomScrollBoundary, CustomScrollBoundaryCallback, Options, ScrollAction, ScrollBehavior, ScrollLogicalPosition, ScrollMode, SkipOverflowHiddenElements, SmoothBehaviorOptions, SmoothScrollExtensions, StandardBehaviorOptions, } from './compute';
|
package/types/utils/string.d.ts
CHANGED
package/utils/callOrReturn.js
CHANGED
package/utils/caseName.js
CHANGED
package/utils/className.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
/* 2026-01-
|
|
2
|
-
import { default as f, default as l } from "@unicom-cloud/utils/class-name";
|
|
1
|
+
/* 2026-01-27 10:43:58 */
|
|
2
|
+
import { default as s, default as f, default as l } from "@unicom-cloud/utils/class-name";
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
s as className,
|
|
5
|
+
f as cs,
|
|
5
6
|
l as default
|
|
6
7
|
};
|
package/utils/constant.js
CHANGED
package/utils/copy.js
CHANGED