@unicom-cloud/ui-common 0.1.7 → 0.1.9
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 +7 -5
- package/Motion.js +1 -1
- package/Progress.js +1 -1
- package/ResizeObserver.js +1 -1
- package/Space.js +5 -7
- package/SuspenseFallbackTest.js +1 -1
- package/TransitionGroup.js +27 -26
- package/development/index.js +27 -25
- package/empty/index.js +1 -1
- package/flex/index.js +63 -67
- package/flex/utils.js +31 -0
- 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 +146 -142
- 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 +34 -29
- package/hooks/use-intersection-observer/index.js +10 -12
- package/hooks/use-intersection-observers/index.js +5 -32
- 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 +1 -1
- package/hooks/use-merge-props/index.js +1 -1
- package/hooks/use-merge-value/index.js +9 -12
- package/hooks/use-mount/index.js +1 -1
- package/hooks/use-mouse/index.js +1 -1
- package/hooks/use-move/index.js +79 -0
- 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 +20 -0
- 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 +4 -6
- package/hooks/useIntersectionObservers.js +5 -32
- 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 +4 -3
- package/hooks/useMount.js +1 -1
- package/hooks/useMouse.js +1 -1
- package/hooks/useMove.js +11 -0
- 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 +9 -0
- 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 +635 -48
- 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 +11 -10
- package/package.json +1 -1
- package/progress/index.js +40 -53
- 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 +79 -88
- package/style.css +1 -1
- package/suspense-fallback-test/index.js +1 -1
- package/transition-group/CSSTransition.js +36 -35
- 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 +2 -1
- package/transition-group/TransitionGroup.js +1 -1
- package/transition-group/TransitionGroupContext.js +1 -1
- package/transition-group/index.js +27 -26
- package/types/development/interface.d.ts +3 -2
- package/types/flex/index.d.ts +6 -5
- package/types/flex/interface.d.ts +13 -12
- package/types/flex/utils.d.ts +19 -0
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/use-move/index.d.ts +4 -0
- package/types/hooks/use-paste-image/index.d.ts +3 -0
- package/types/hooks/use-theme/index.d.ts +2 -2
- package/types/index.d.ts +3 -1
- package/types/motion/hooks/useStepQueue.d.ts +1 -1
- package/types/progress/index.d.ts +0 -28
- package/types/space/index.d.ts +4 -4
- package/types/space/interface.d.ts +17 -10
- package/types/transition-group/index.d.ts +10 -10
- package/types/utils/date.d.ts +1 -1
- package/types/utils/dom.d.ts +8 -9
- package/types/utils/findRootElement.d.ts +2 -2
- package/types/utils/is.d.ts +3 -2
- package/types/utils/ref.d.ts +11 -11
- package/types/utils/scrollIntoViewIfNeeded.d.ts +1 -1
- package/types/utils/tree.d.ts +1 -1
- package/types/utils/uuid.d.ts +1 -1
- package/types/utils/validate.d.ts +2 -1
- package/utils/callbackOriginRef.js +1 -1
- 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 +8 -2
- package/utils/dayjs.js +1 -1
- package/utils/dom.js +19 -25
- package/utils/emitter.js +1 -1
- package/utils/fileToURL.js +1 -1
- package/utils/fillNBSP.js +1 -1
- package/utils/findRootElement.js +15 -15
- 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 +6 -6
- package/utils/index.js +355 -323
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.js +113 -76
- 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 +1 -1
- 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 +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 +1 -1
- package/utils/tree.js +7 -9
- package/utils/tween.js +1 -1
- package/utils/uuid.js +5 -4
- package/utils/validate.js +14 -16
- package/utils/warning.js +1 -1
- package/flex/interface.js +0 -10
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
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
/* 2025-
|
|
1
|
+
/* 2025-12-17 18:27:04 */
|
|
2
2
|
import d from "@unicom-cloud/utils/dom-helpers/canUseDOM";
|
|
3
|
+
import "@unicom-cloud/utils/dom-helpers/getElementCoordinates";
|
|
3
4
|
import "@unicom-cloud/utils/dom-helpers/reflow";
|
|
4
5
|
import "../../utils/is.js";
|
|
5
6
|
function a(n, t) {
|
|
6
7
|
const i = {};
|
|
7
8
|
return i[n.toLowerCase()] = t.toLowerCase(), i[`Webkit${n}`] = `webkit${t}`, i[`Moz${n}`] = `moz${t}`, i[`ms${n}`] = `MS${t}`, i[`O${n}`] = `o${t.toLowerCase()}`, i;
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
+
function u(n, t) {
|
|
10
11
|
const i = {
|
|
11
12
|
animationend: a("Animation", "AnimationEnd"),
|
|
12
13
|
transitionend: a("Transition", "TransitionEnd")
|
|
13
14
|
};
|
|
14
15
|
return n && ("AnimationEvent" in t || delete i.animationend.animation, "TransitionEvent" in t || delete i.transitionend.transition), i;
|
|
15
16
|
}
|
|
16
|
-
const l =
|
|
17
|
+
const l = u(
|
|
17
18
|
d,
|
|
18
19
|
typeof window < "u" ? window : {}
|
|
19
20
|
);
|
|
@@ -34,8 +35,8 @@ function f(n) {
|
|
|
34
35
|
}
|
|
35
36
|
return "";
|
|
36
37
|
}
|
|
37
|
-
const p = f("animationend"),
|
|
38
|
-
function
|
|
38
|
+
const p = f("animationend"), m = f("transitionend"), b = !!(p && m), g = p || "animationend", M = m || "transitionend";
|
|
39
|
+
function O(n, t) {
|
|
39
40
|
if (!n) return null;
|
|
40
41
|
if (typeof n == "object") {
|
|
41
42
|
const i = t.replace(
|
|
@@ -47,10 +48,10 @@ function M(n, t) {
|
|
|
47
48
|
return `${n}-${t}`;
|
|
48
49
|
}
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
g as animationEndName,
|
|
52
|
+
O as getTransitionName,
|
|
52
53
|
f as getVendorPrefixedEventName,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
u as getVendorPrefixes,
|
|
55
|
+
b as supportTransition,
|
|
56
|
+
M as transitionEndName
|
|
56
57
|
};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/ui-common","version":"0.1.
|
|
1
|
+
{"name":"@unicom-cloud/ui-common","version":"0.1.9","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
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/* 2025-
|
|
2
|
-
import { UI_COMMON_PREFIX as
|
|
1
|
+
/* 2025-12-17 18:27:04 */
|
|
2
|
+
import { UI_COMMON_PREFIX as a } from "@unicom-cloud/utils/constant/ui";
|
|
3
3
|
import "../utils/is.js";
|
|
4
|
-
import { isNumber as
|
|
4
|
+
import { isNumber as u } from "@unicom-cloud/utils/is";
|
|
5
5
|
const t = {
|
|
6
6
|
status: null,
|
|
7
7
|
settings: {
|
|
8
8
|
parent: document.body,
|
|
9
9
|
progress: document.createElement("div"),
|
|
10
10
|
bar: document.createElement("div"),
|
|
11
|
-
minimum: 0.
|
|
12
|
-
easing: "
|
|
13
|
-
positionUsing: "",
|
|
14
|
-
speed:
|
|
11
|
+
minimum: 0.07,
|
|
12
|
+
easing: "ease-out",
|
|
13
|
+
positionUsing: "translate",
|
|
14
|
+
speed: 227,
|
|
15
15
|
trickle: !0,
|
|
16
|
-
trickleSpeed:
|
|
16
|
+
trickleSpeed: 227
|
|
17
17
|
},
|
|
18
18
|
/**
|
|
19
19
|
* Updates configuration.
|
|
@@ -33,24 +33,16 @@ const t = {
|
|
|
33
33
|
*/
|
|
34
34
|
set(e) {
|
|
35
35
|
const s = t.isStarted();
|
|
36
|
-
e =
|
|
37
|
-
const r = t.render(!s), i = t.settings.speed
|
|
38
|
-
return r.offsetWidth,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}), r.offsetWidth, setTimeout(function() {
|
|
43
|
-
n(r, {
|
|
44
|
-
transition: `all ${i}ms linear`,
|
|
45
|
-
opacity: 0
|
|
46
|
-
}), setTimeout(function() {
|
|
47
|
-
t.remove(), o();
|
|
48
|
-
}, i);
|
|
49
|
-
}, i)) : setTimeout(o, i);
|
|
36
|
+
e = g(e, t.settings.minimum, 1), t.status = e === 1 ? null : e;
|
|
37
|
+
const r = t.render(!s), i = t.settings.speed;
|
|
38
|
+
return r.offsetWidth, m(function(n) {
|
|
39
|
+
f(t.settings.bar, c(e, i)), e === 1 ? (r.offsetWidth, setTimeout(function() {
|
|
40
|
+
t.remove(), n();
|
|
41
|
+
}, i)) : setTimeout(n, i);
|
|
50
42
|
}), t;
|
|
51
43
|
},
|
|
52
44
|
isStarted() {
|
|
53
|
-
return
|
|
45
|
+
return u(t.status);
|
|
54
46
|
},
|
|
55
47
|
/**
|
|
56
48
|
* Shows the progress bar.
|
|
@@ -60,7 +52,7 @@ const t = {
|
|
|
60
52
|
*
|
|
61
53
|
*/
|
|
62
54
|
start() {
|
|
63
|
-
return t.status || t.set(0), t.settings.trickle &&
|
|
55
|
+
return t.status || t.set(0), t.settings.trickle && l(), t;
|
|
64
56
|
},
|
|
65
57
|
/**
|
|
66
58
|
* Hides the progress bar.
|
|
@@ -81,7 +73,10 @@ const t = {
|
|
|
81
73
|
*/
|
|
82
74
|
inc(e) {
|
|
83
75
|
let s = t.status;
|
|
84
|
-
|
|
76
|
+
if (!s)
|
|
77
|
+
return t.start();
|
|
78
|
+
if (!(s > 1))
|
|
79
|
+
return u(e) || (s >= 0 && s < 0.2 && (e = 0.1), s >= 0.2 && s < 0.5 && (e = 0.04), s >= 0.5 && s < 0.8 && (e = 0.02), s >= 0.8 && s < 0.99 && (e = 5e-3)), e ??= 7e-4, s = g(s + e, 0, 0.994), t.set(s);
|
|
85
80
|
},
|
|
86
81
|
trickle() {
|
|
87
82
|
return t.inc();
|
|
@@ -95,56 +90,48 @@ const t = {
|
|
|
95
90
|
return t.settings.progress;
|
|
96
91
|
t.settings.progress.hasAttribute("class"), t.settings.bar.hasAttribute("class"), t.settings.progress.setAttribute(
|
|
97
92
|
"class",
|
|
98
|
-
`${
|
|
93
|
+
`${a}-progress`
|
|
99
94
|
), t.settings.bar.setAttribute(
|
|
100
95
|
"class",
|
|
101
|
-
`${
|
|
102
|
-
), t.settings.progress.contains(t.settings.bar) || t.settings.progress.
|
|
103
|
-
let s = e ? "-100" :
|
|
104
|
-
return
|
|
105
|
-
transition: "all 0 linear",
|
|
106
|
-
transform: `translate3d(${s}%,0,0)`
|
|
107
|
-
}), t.settings.parent.appendChild(t.settings.progress), t.settings.progress;
|
|
96
|
+
`${a}-progress-bar`
|
|
97
|
+
), t.settings.progress.contains(t.settings.bar) || t.settings.progress.append(t.settings.bar);
|
|
98
|
+
let s = e ? "-100" : p(t.status || 0);
|
|
99
|
+
return f(t.settings.bar, c(0, s)), t.settings.parent.append(t.settings.progress), t.settings.progress;
|
|
108
100
|
},
|
|
109
101
|
/**
|
|
110
102
|
* Removes the element. Opposite of render().
|
|
111
103
|
*/
|
|
112
104
|
remove() {
|
|
113
105
|
t.settings.progress.remove();
|
|
114
|
-
},
|
|
115
|
-
/**
|
|
116
|
-
* Determine which positioning CSS rule to use.
|
|
117
|
-
*/
|
|
118
|
-
getPositioningCSS() {
|
|
119
|
-
const e = t.settings.parent.style;
|
|
120
|
-
return "perspective" in e ? "translate3d" : "transform" in e ? "translate" : "margin";
|
|
121
106
|
}
|
|
122
107
|
};
|
|
123
|
-
function
|
|
108
|
+
function g(e, s, r) {
|
|
124
109
|
return Math.max(Math.min(e, r), s);
|
|
125
110
|
}
|
|
126
|
-
function
|
|
111
|
+
function p(e) {
|
|
127
112
|
return (-1 + e) * 100;
|
|
128
113
|
}
|
|
129
|
-
function
|
|
130
|
-
|
|
131
|
-
|
|
114
|
+
function c(e, s, r = t.settings.easing) {
|
|
115
|
+
return {
|
|
116
|
+
transform: `translate(${p(e)}%,0)`,
|
|
117
|
+
transition: `transform ${s}ms ${r}`
|
|
118
|
+
};
|
|
132
119
|
}
|
|
133
|
-
function
|
|
120
|
+
function l() {
|
|
134
121
|
setTimeout(() => {
|
|
135
|
-
t.status && (t.trickle(),
|
|
122
|
+
t.status && (t.trickle(), l());
|
|
136
123
|
}, t.settings.trickleSpeed);
|
|
137
124
|
}
|
|
138
|
-
const
|
|
125
|
+
const o = [];
|
|
139
126
|
function d() {
|
|
140
|
-
const e =
|
|
127
|
+
const e = o.shift();
|
|
141
128
|
e && e(d);
|
|
142
129
|
}
|
|
143
|
-
function
|
|
144
|
-
|
|
130
|
+
function m(e) {
|
|
131
|
+
o.push(e), o.length && d();
|
|
145
132
|
}
|
|
146
|
-
function
|
|
147
|
-
Object.entries(s).forEach(([r, i],
|
|
133
|
+
function f(e, s) {
|
|
134
|
+
Object.entries(s).forEach(([r, i], n, b) => {
|
|
148
135
|
i === void 0 || (e.style[r] = i);
|
|
149
136
|
});
|
|
150
137
|
}
|
package/resize-observer/index.js
CHANGED
package/space/index.js
CHANGED
|
@@ -1,94 +1,85 @@
|
|
|
1
|
-
/* 2025-
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { UI_COMMON_PREFIX as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import "../utils/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const Z = {
|
|
12
|
-
size: "small",
|
|
1
|
+
/* 2025-12-17 18:27:04 */
|
|
2
|
+
import { jsx as o, jsxs as k } from "react/jsx-runtime";
|
|
3
|
+
import { UI_COMMON_PREFIX as H } from "@unicom-cloud/utils/constant/ui";
|
|
4
|
+
import { forwardRef as g, useRef as O, useImperativeHandle as _, Fragment as A } from "react";
|
|
5
|
+
import L from "../flex/index.js";
|
|
6
|
+
import U from "../hooks/use-merge-props/index.js";
|
|
7
|
+
import X from "@unicom-cloud/utils/class-name";
|
|
8
|
+
import { toArray as b } from "../utils/toArray.js";
|
|
9
|
+
const q = {
|
|
10
|
+
gap: "small",
|
|
13
11
|
direction: "horizontal"
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
l.displayName = "Space";
|
|
84
|
-
const y = $(
|
|
85
|
-
(a, s) => /* @__PURE__ */ n(l, { ...a, ref: s, direction: "vertical" })
|
|
12
|
+
};
|
|
13
|
+
function B(n, s) {
|
|
14
|
+
const h = U(
|
|
15
|
+
n,
|
|
16
|
+
q,
|
|
17
|
+
{}
|
|
18
|
+
), {
|
|
19
|
+
className: v,
|
|
20
|
+
style: w,
|
|
21
|
+
children: N,
|
|
22
|
+
size: R,
|
|
23
|
+
gap: j,
|
|
24
|
+
direction: r,
|
|
25
|
+
justifyContent: i,
|
|
26
|
+
align: x,
|
|
27
|
+
alignItems: C,
|
|
28
|
+
wrap: l,
|
|
29
|
+
separator: c,
|
|
30
|
+
rtl: m,
|
|
31
|
+
legacy: I,
|
|
32
|
+
...P
|
|
33
|
+
} = h, e = `${H}-space`, z = ["horizontal", "row-reverse", "row"].includes(
|
|
34
|
+
r
|
|
35
|
+
), E = { horizontal: "row", vertical: "column" }[r] ?? r, p = I ? { start: "flex-start", end: "flex-end" } : {}, a = p[i] ?? i;
|
|
36
|
+
let t = C ?? x ?? (z ? "center" : void 0);
|
|
37
|
+
t = p[t] ?? t;
|
|
38
|
+
const M = X(
|
|
39
|
+
e,
|
|
40
|
+
{
|
|
41
|
+
[`${e}-${r}`]: r,
|
|
42
|
+
[`${e}-justify-content-${a}`]: a,
|
|
43
|
+
[`${e}-align-items-${t}`]: t,
|
|
44
|
+
[`${e}-rtl`]: m
|
|
45
|
+
},
|
|
46
|
+
l ? `${e}-wrap` : `${e}-no-wrap`,
|
|
47
|
+
v
|
|
48
|
+
), S = b(N), d = O(null);
|
|
49
|
+
return _(s, () => ({
|
|
50
|
+
getRootElement() {
|
|
51
|
+
return d.current.getRootElement();
|
|
52
|
+
}
|
|
53
|
+
})), /* @__PURE__ */ o(
|
|
54
|
+
L,
|
|
55
|
+
{
|
|
56
|
+
ref: d,
|
|
57
|
+
style: w,
|
|
58
|
+
className: M,
|
|
59
|
+
gap: j ?? R,
|
|
60
|
+
wrap: l,
|
|
61
|
+
justifyContent: a,
|
|
62
|
+
alignItems: t,
|
|
63
|
+
direction: E,
|
|
64
|
+
rtl: m,
|
|
65
|
+
inline: !0,
|
|
66
|
+
...P,
|
|
67
|
+
children: S.map((f, u) => {
|
|
68
|
+
const F = f?.key ?? u, V = c != null && u > 0;
|
|
69
|
+
return /* @__PURE__ */ k(A, { children: [
|
|
70
|
+
V && /* @__PURE__ */ o("div", { className: `${e}-item-separator`, children: c }),
|
|
71
|
+
/* @__PURE__ */ o("div", { className: `${e}-item`, children: f })
|
|
72
|
+
] }, F);
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
const $ = g(B), y = g(
|
|
78
|
+
(n, s) => /* @__PURE__ */ o($, { ...n, ref: s, direction: "vertical" })
|
|
86
79
|
);
|
|
87
80
|
y.displayName = "SpaceVertical";
|
|
88
|
-
|
|
89
|
-
Vertical: y
|
|
90
|
-
});
|
|
81
|
+
$.Vertical = y;
|
|
91
82
|
export {
|
|
92
83
|
y as SpaceVertical,
|
|
93
|
-
|
|
84
|
+
$ as default
|
|
94
85
|
};
|
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--pi: 3.141592653589793}@keyframes pqbc-keyframes-vibrate{0%{transform:translate(0)}20%{transform:translate(-2px,2px)}40%{transform:translate(-2px,-2px)}60%{transform:translate(2px,2px)}80%{transform:translate(2px,-2px)}to{transform:translate(0)}}@keyframes pqbc-keyframes-rotate-360deg{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes pqbc-keyframes-blink{0%{opacity:1}50%{opacity:0}to{opacity:1}}.pqbc-animation-rotate-360deg{animation:pqbc-keyframes-rotate-360deg 1s infinite cubic-bezier(0,0,1,1)}.pqbc-animation-vibrate{animation:pqbc-keyframes-vibrate .3s linear infinite both}.pqbc-animation-blink-enter,.pqbc-animation-blink-appear{opacity:0}.pqbc-animation-blink-enter-active,.pqbc-animation-blink-appear-active{opacity:1;transition:opacity .3s linear}.pqbc-animation-blink-enter-done{animation:pqbc-keyframes-blink .5s linear}.pqbc-display-none{display:none!important}.pqbc-visibility-hidden{visibility:hidden!important}.pqbc-overflow-hidden{overflow:hidden}.pqbc-cursor-pointer{cursor:pointer}.pqbc-filter-invert-100{filter:invert(100%)}.pqbc-filter-grayscale-100{filter:grayscale(100%)}.pqbc-isolation-isolate{isolation:isolate}.pqbc-direction-rtl{direction:rtl}.pqbc-line-height-1{line-height:1}.pqbc-text-overflow-ellipsis{text-overflow:ellipsis;white-space:nowrap;word-break:break-all;overflow:hidden}.pqbc-line-clamp-2,.pqbc-line-clamp-3,.pqbc-line-clamp-4,.pqbc-line-clamp-5{display:-webkit-box;display:-moz-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal}.pqbc-line-clamp-2{line-clamp:2;-webkit-line-clamp:2}.pqbc-line-clamp-3{line-clamp:3;-webkit-line-clamp:3}.pqbc-line-clamp-4{line-clamp:4;-webkit-line-clamp:4}.pqbc-line-clamp-5{line-clamp:5;-webkit-line-clamp:5}.pqb-theme-dark,.pqbm-theme-dark,.pqb-theme-dark *,.pqbm-theme-dark *{color-scheme:dark}[dir=rtl] *{direction:rtl}.pqbc-empty{width:100%}.pqbc-empty .pqbc-empty-description{line-height:1}.pqbc-development{width:100%;height:100%;min-height:400px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px}.pqbc-development-icon,.pqbc-development-img{width:50px;height:50px}.pqbc-development-label{font-size:20px;color:var(--pqbc-color-neutral-6, var(--pqb-color-neutral-6, var(--pqbm-color-neutral-6,
|
|
1
|
+
:root{--pi: 3.141592653589793}@keyframes pqbc-keyframes-vibrate{0%{transform:translate(0)}20%{transform:translate(-2px,2px)}40%{transform:translate(-2px,-2px)}60%{transform:translate(2px,2px)}80%{transform:translate(2px,-2px)}to{transform:translate(0)}}@keyframes pqbc-keyframes-rotate-360deg{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes pqbc-keyframes-blink{0%{opacity:1}50%{opacity:0}to{opacity:1}}.pqbc-animation-rotate-360deg{animation:pqbc-keyframes-rotate-360deg 1s infinite cubic-bezier(0,0,1,1)}.pqbc-animation-vibrate{animation:pqbc-keyframes-vibrate .3s linear infinite both}.pqbc-animation-blink-enter,.pqbc-animation-blink-appear{opacity:0}.pqbc-animation-blink-enter-active,.pqbc-animation-blink-appear-active{opacity:1;transition:opacity .3s linear}.pqbc-animation-blink-enter-done{animation:pqbc-keyframes-blink .5s linear}.pqbc-display-none{display:none!important}.pqbc-visibility-hidden{visibility:hidden!important}.pqbc-overflow-hidden{overflow:hidden}.pqbc-cursor-pointer{cursor:pointer}.pqbc-filter-invert-100{filter:invert(100%)}.pqbc-filter-grayscale-100{filter:grayscale(100%)}.pqbc-isolation-isolate{isolation:isolate}.pqbc-direction-rtl{direction:rtl}.pqbc-line-height-1{line-height:1}.pqbc-text-overflow-ellipsis{text-overflow:ellipsis;white-space:nowrap;word-break:break-all;overflow:hidden}.pqbc-line-clamp-2,.pqbc-line-clamp-3,.pqbc-line-clamp-4,.pqbc-line-clamp-5{display:-webkit-box;display:-moz-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal}.pqbc-line-clamp-2{line-clamp:2;-webkit-line-clamp:2}.pqbc-line-clamp-3{line-clamp:3;-webkit-line-clamp:3}.pqbc-line-clamp-4{line-clamp:4;-webkit-line-clamp:4}.pqbc-line-clamp-5{line-clamp:5;-webkit-line-clamp:5}.pqb-theme-dark,.pqbm-theme-dark,.pqb-theme-dark *,.pqbm-theme-dark *{color-scheme:dark}[dir=rtl] *{direction:rtl}.pqbc-empty{width:100%}.pqbc-empty .pqbc-empty-description{line-height:1}.pqbc-development{width:100%;height:100%;min-height:400px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px}.pqbc-development-icon,.pqbc-development-img{width:50px;height:50px}.pqbc-development-label{font-size:20px;--color-neutral: #868788;color:var(--pqbc-color-neutral-6, var(--pqb-color-neutral-6, var(--pqbm-color-neutral-6, --color-neutral)))}.pqbc-space-vertical{width:100%}.pqbc-space-rtl{direction:rtl}.pqbc-icons-file{position:relative}.pqbc-icons-file-svg{width:30px;height:30px}.pqbc-icons-file-svg-bg{--primary: 26, 94, 255;fill:rgb(var(--pqbc-primary-6, var(--pqb-primary-6, var(--pqbm-primary-6, --primary))))}.pqbc-icons-file-svg-tr{fill:#fff;fill-opacity:.7}.pqbc-icons-file-svg-text{fill:#fff;font-weight:bolder;font-size:66px;text-align:center}.pqbc-flex{display:flex;margin:0;padding:0;box-sizing:border-box}.pqbc-flex-inline{display:inline-flex}.pqbc-flex:empty{display:none}.pqbc-flex-rtl{direction:rtl}.pqbc-progress{pointer-events:none}.pqbc-progress-bar{--primary: 26, 94, 255;background-color:rgb(var(--pqbc-primary-6, var(--pqb-primary-6, var(--pqbm-primary-6, --primary))));position:fixed;z-index:870227;inset-block-start:0;inset-inline-start:0;width:100%;height:2px}
|
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
/* 2025-
|
|
1
|
+
/* 2025-12-17 18:27:04 */
|
|
2
2
|
import { jsx as h } from "react/jsx-runtime";
|
|
3
3
|
import m from "react";
|
|
4
4
|
import "@unicom-cloud/utils/dom-helpers/canUseDOM";
|
|
5
|
+
import "@unicom-cloud/utils/dom-helpers/getElementCoordinates";
|
|
5
6
|
import d from "@unicom-cloud/utils/dom-helpers/reflow";
|
|
6
7
|
import "../utils/is.js";
|
|
7
8
|
import { findRootElement as c } from "../utils/findRootElement.js";
|
|
8
9
|
import E from "./Transition.js";
|
|
9
10
|
import { isString as a } from "@unicom-cloud/utils/is";
|
|
10
|
-
function o(r,
|
|
11
|
-
r instanceof Element &&
|
|
12
|
-
r.classList[s](
|
|
11
|
+
function o(r, t, s = "add") {
|
|
12
|
+
r instanceof Element && t && a(t) && t.split(" ").filter(Boolean).forEach((e, i, n) => {
|
|
13
|
+
r.classList[s](e);
|
|
13
14
|
});
|
|
14
15
|
}
|
|
15
|
-
class
|
|
16
|
+
class S extends m.Component {
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments), this.appliedClasses = {
|
|
18
19
|
appear: {},
|
|
19
20
|
enter: {},
|
|
20
21
|
exit: {}
|
|
21
|
-
}, this.onEnter = (
|
|
22
|
-
const [
|
|
23
|
-
|
|
22
|
+
}, this.onEnter = (t, s) => {
|
|
23
|
+
const [e, i] = this.resolveArguments(
|
|
24
|
+
t,
|
|
24
25
|
s
|
|
25
26
|
);
|
|
26
|
-
this.removeClasses(
|
|
27
|
-
}, this.onEntering = (
|
|
28
|
-
const [
|
|
29
|
-
|
|
27
|
+
this.removeClasses(e, "exit"), this.addClass(e, i ? "appear" : "enter", "base"), this.props.onEnter && this.props.onEnter(e, s);
|
|
28
|
+
}, this.onEntering = (t, s) => {
|
|
29
|
+
const [e, i] = this.resolveArguments(
|
|
30
|
+
t,
|
|
30
31
|
s
|
|
31
32
|
), n = i ? "appear" : "enter";
|
|
32
|
-
this.addClass(
|
|
33
|
-
}, this.onEntered = (
|
|
34
|
-
const [
|
|
35
|
-
|
|
33
|
+
this.addClass(e, n, "active"), this.props.onEntering && this.props.onEntering(e, s);
|
|
34
|
+
}, this.onEntered = (t, s) => {
|
|
35
|
+
const [e, i] = this.resolveArguments(
|
|
36
|
+
t,
|
|
36
37
|
s
|
|
37
38
|
), n = i ? "appear" : "enter";
|
|
38
|
-
this.removeClasses(
|
|
39
|
-
}, this.onExit = (
|
|
40
|
-
const [s] = this.resolveArguments(
|
|
39
|
+
this.removeClasses(e, n), this.addClass(e, n, "done"), this.props.onEntered && this.props.onEntered(e, s);
|
|
40
|
+
}, this.onExit = (t) => {
|
|
41
|
+
const [s] = this.resolveArguments(t);
|
|
41
42
|
this.removeClasses(s, "appear"), this.removeClasses(s, "enter"), this.addClass(s, "exit", "base"), this.props.onExit && this.props.onExit(s);
|
|
42
|
-
}, this.onExiting = (
|
|
43
|
-
const [s] = this.resolveArguments(
|
|
43
|
+
}, this.onExiting = (t) => {
|
|
44
|
+
const [s] = this.resolveArguments(t);
|
|
44
45
|
this.addClass(s, "exit", "active"), this.props.onExiting && this.props.onExiting(s);
|
|
45
|
-
}, this.onExited = (
|
|
46
|
-
const [s] = this.resolveArguments(
|
|
46
|
+
}, this.onExited = (t) => {
|
|
47
|
+
const [s] = this.resolveArguments(t);
|
|
47
48
|
this.removeClasses(s, "exit"), this.addClass(s, "exit", "done"), this.props.onExited && this.props.onExited(s);
|
|
48
|
-
}, this.resolveArguments = (
|
|
49
|
-
c(this.props.refElement) ||
|
|
49
|
+
}, this.resolveArguments = (t, s) => [
|
|
50
|
+
c(this.props.refElement) || t,
|
|
50
51
|
s
|
|
51
|
-
], this.getClassNames = (
|
|
52
|
-
const { classNames: s } = this.props,
|
|
52
|
+
], this.getClassNames = (t) => {
|
|
53
|
+
const { classNames: s } = this.props, e = a(s), i = e && s ? `${s}-` : "", n = e ? `${i}${t}` : s[t], p = e ? `${n}-active` : s[`${t}Active`], l = e ? `${n}-done` : s[`${t}Done`];
|
|
53
54
|
return {
|
|
54
55
|
baseClassName: n,
|
|
55
56
|
activeClassName: p,
|
|
@@ -62,21 +63,21 @@ class A extends m.Component {
|
|
|
62
63
|
classNames: ""
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
|
-
addClass(
|
|
66
|
-
let i = this.getClassNames(s)[`${
|
|
66
|
+
addClass(t, s, e) {
|
|
67
|
+
let i = this.getClassNames(s)[`${e}ClassName`];
|
|
67
68
|
const { doneClassName: n } = this.getClassNames("enter");
|
|
68
|
-
s === "appear" &&
|
|
69
|
+
s === "appear" && e === "done" && n && (i += ` ${n}`), e === "active" && t && d(t), i && (this.appliedClasses[s][e] = i, o(t, i, "add"));
|
|
69
70
|
}
|
|
70
|
-
removeClasses(
|
|
71
|
+
removeClasses(t, s) {
|
|
71
72
|
const {
|
|
72
|
-
base:
|
|
73
|
+
base: e,
|
|
73
74
|
active: i,
|
|
74
75
|
done: n
|
|
75
76
|
} = this.appliedClasses[s];
|
|
76
|
-
this.appliedClasses[s] = {},
|
|
77
|
+
this.appliedClasses[s] = {}, e && o(t, e, "remove"), i && o(t, i, "remove"), n && o(t, n, "remove");
|
|
77
78
|
}
|
|
78
79
|
render() {
|
|
79
|
-
const { classNames:
|
|
80
|
+
const { classNames: t, ...s } = this.props;
|
|
80
81
|
return /* @__PURE__ */ h(
|
|
81
82
|
E,
|
|
82
83
|
{
|
|
@@ -92,5 +93,5 @@ class A extends m.Component {
|
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
export {
|
|
95
|
-
|
|
96
|
+
S as default
|
|
96
97
|
};
|