@unicom-cloud/ui-common 0.1.25 → 0.1.27
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/.virtual/_rolldown/runtime.js +1 -1
- package/.vite/manifest.json +33 -18
- package/border-beam/BorderBeam.js +2 -2
- package/border-beam/Effect.d.ts +1 -1
- package/border-beam/Effect.js +19 -17
- package/border-beam/constants.js +1 -1
- package/border-beam/hooks/useBorderSize.js +1 -1
- package/border-beam/hooks/useChildDom.js +3 -3
- package/border-beam/index.d.ts +3 -0
- package/border-beam/index.js +2 -2
- package/border-beam/utils.js +1 -1
- package/development/Development.js +1 -1
- package/development/index.d.ts +3 -0
- package/development/index.js +2 -2
- package/empty/Empty.js +1 -1
- package/empty/index.d.ts +3 -0
- package/empty/index.js +2 -2
- package/flex/Flex.js +1 -1
- package/flex/index.d.ts +4 -1
- package/flex/index.js +2 -2
- package/flex/utils.js +1 -1
- package/higher-order/index.js +1 -1
- package/higher-order/with-speech-synthesis/index.d.ts +3 -0
- package/higher-order/with-speech-synthesis/index.js +2 -2
- package/higher-order/with-speech-synthesis/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.d.ts +1 -1
- package/hooks/create-use-storage-state/index.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.d.ts +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.d.ts +4 -4
- 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-effect-event/index.js +1 -1
- package/hooks/use-event/index.js +1 -1
- package/hooks/use-event-emitter/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.d.ts +3 -3
- package/hooks/use-fullscreen/index.js +1 -1
- package/hooks/use-get-state/index.js +1 -1
- package/hooks/use-history-travel/index.d.ts +5 -5
- 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-viewport/index.js +1 -1
- package/hooks/use-infinite-scroll/index.d.ts +4 -4
- 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.d.ts +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.d.ts +5 -5
- 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.d.ts +6 -3
- package/hooks/use-memoized-fn/index.js +2 -2
- package/hooks/use-merge-props/index.js +1 -1
- package/hooks/use-merge-value/index.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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.d.ts +7 -7
- package/hooks/use-selections/index.js +1 -1
- package/hooks/use-session-storage-state/index.d.ts +1 -1
- package/hooks/use-session-storage-state/index.js +1 -1
- package/hooks/use-set/index.d.ts +3 -3
- package/hooks/use-set/index.js +1 -1
- package/hooks/use-set-state/index.d.ts +2 -2
- 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.d.ts +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.d.ts +3 -2
- package/hooks/use-url-state/index.js +25 -31
- package/hooks/use-virtual-list/index.d.ts +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/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/icons/file/IconFile.js +1 -1
- package/icons/file/index.d.ts +3 -0
- package/icons/file/index.js +2 -2
- package/index.js +604 -593
- package/package.json +1 -1
- package/progress/Progress.js +1 -1
- package/progress/index.d.ts +3 -0
- package/progress/index.js +2 -2
- package/resize-observer/Collection.d.ts +1 -1
- package/resize-observer/Collection.js +1 -1
- package/resize-observer/ResizeObserver.js +1 -1
- package/resize-observer/SingleObserver.js +1 -1
- package/resize-observer/index.d.ts +4 -1
- package/resize-observer/index.js +2 -2
- package/resize-observer/observerUtil.js +1 -1
- package/space/Space.js +1 -1
- package/space/index.d.ts +4 -1
- package/space/index.js +2 -2
- package/style/animation.less +0 -24
- package/style/global.less +39 -9
- package/style/index.less +6 -1
- package/style/normalize.less +13 -0
- package/style/transition.less +63 -0
- package/style/variables.less +1 -0
- package/style.css +1 -1
- package/suspense-fallback-test/SuspenseFallbackTest.js +1 -1
- package/suspense-fallback-test/index.d.ts +3 -0
- package/suspense-fallback-test/index.js +2 -2
- package/test.js +1 -1
- package/timer/Timer.js +1 -1
- package/timer/index.d.ts +3 -0
- package/timer/index.js +2 -2
- package/transition/Transition.d.ts +6 -1
- package/transition/Transition.js +63 -63
- package/transition/TransitionCSS.d.ts +14 -2
- package/transition/TransitionCSS.js +33 -33
- package/transition/TransitionGroup.d.ts +8 -1
- package/transition/TransitionGroup.js +3 -4
- package/transition/TransitionStyle.d.ts +14 -2
- package/transition/TransitionStyle.js +3 -4
- package/transition/constants.d.ts +18 -15
- package/transition/constants.js +49 -40
- package/transition/context.js +1 -1
- package/transition/index.d.ts +46 -4
- package/transition/index.js +11 -6
- package/transition/interface.d.ts +20 -21
- package/transition/utils.d.ts +2 -1
- package/transition/utils.js +64 -61
- package/utils/callOrReturn.js +1 -1
- package/utils/callbackOriginRef.js +1 -1
- package/utils/caseName.js +1 -1
- package/utils/className.js +1 -1
- package/utils/constant.d.ts +2 -0
- package/utils/constant.js +5 -5
- package/utils/copy.js +1 -1
- package/utils/css.d.ts +1 -0
- package/utils/css.js +4 -0
- package/utils/date.js +1 -1
- package/utils/dayjs.js +1 -1
- package/utils/dom.d.ts +2 -1
- package/utils/dom.js +21 -21
- package/utils/emitter.js +1 -1
- package/utils/file.js +1 -1
- package/utils/fileRead.js +1 -1
- package/utils/fileToDataURL.js +1 -1
- package/utils/fillNBSP.js +1 -1
- package/utils/findRootElement.d.ts +1 -1
- package/utils/findRootElement.js +13 -13
- package/utils/findScrollParent.js +1 -1
- package/utils/getHighlightText.js +1 -1
- package/utils/getHotkeyHandler.js +1 -1
- package/utils/getScrollBarHeight.js +1 -1
- package/utils/getScrollBarSize.js +1 -1
- package/utils/getScrollBarWidth.js +1 -1
- package/utils/getStringLength.js +1 -1
- package/utils/include.js +1 -1
- package/utils/index.d.ts +4 -2
- package/utils/index.js +312 -304
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.d.ts +2 -2
- package/utils/is.js +16 -16
- 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/names.js +3 -3
- package/utils/object.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/reactNode.js +1 -1
- package/utils/ref.d.ts +3 -3
- 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 +2 -2
- package/utils/setPrimaryColor.js +1 -1
- package/utils/setTheme.js +2 -2
- package/utils/string.js +1 -1
- package/utils/style.js +1 -1
- package/utils/throttleByRequestAnimationFrame.d.ts +6 -0
- package/utils/throttleByRequestAnimationFrame.js +18 -0
- package/utils/tinycolor.js +1 -1
- package/utils/toArray.js +1 -1
- package/utils/tree.js +1 -1
- package/utils/tunnel.d.ts +17 -0
- package/utils/tunnel.js +55 -0
- 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/version/index.js +9 -9
- package/hooks/use-event-emitter/demo/demo1.d.ts +0 -10
- package/utils/throttleByRaf.d.ts +0 -6
- package/utils/throttleByRaf.js +0 -16
- package/utils/throttleByRaf2.d.ts +0 -6
- package/utils/throttleByRaf2.js +0 -9
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/ui-common","version":"0.1.
|
|
1
|
+
{"name":"@unicom-cloud/ui-common","version":"0.1.27","dependencies":{"@unicom-cloud/utils":"^0.1.0","@unicom-cloud/icons":"^0.1.0","react-compiler-runtime":"^1.0.0"},"peerDependencies":{"dayjs":"^1.11.21","lodash":"^4.18.1","react":"^18.3.1","react-dom":"^18.3.1","react-is":"^18.3.1"},"type":"module","types":"./index.d.ts","main":"./index.js","bin":{"ui":"./test.js"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|
package/progress/Progress.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { isNumber as e, isUndefined as t } from "../utils/is.js";
|
|
3
3
|
import { UI_COMMON_PREFIX as n } from "@unicom-cloud/utils/constant/ui";
|
|
4
4
|
//#region components/common/progress/Progress.js
|
package/progress/index.d.ts
CHANGED
package/progress/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { PROGRESS_COMPONENT_INFO as e } from "../utils/names.js";
|
|
3
3
|
import t from "./Progress.js";
|
|
4
4
|
//#region components/common/progress/index.js
|
|
5
|
-
var n = Object.assign(t, {
|
|
5
|
+
var n = Object.assign(t, { ...e });
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
8
8
|
/* 独立思考,明辨是非 */
|
|
@@ -4,5 +4,5 @@ export declare const CollectionContext: import("react").Context<OnCollectionResi
|
|
|
4
4
|
/**
|
|
5
5
|
* Collect all the resize event from children ResizeObserver
|
|
6
6
|
*/
|
|
7
|
-
export declare function Collection({ children, onBatchResize }: CollectionProps): import("react
|
|
7
|
+
export declare function Collection({ children, onBatchResize }: CollectionProps): import("react").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { createContext as e, useCallback as t, useContext as n, useRef as r } from "react";
|
|
3
3
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
4
|
//#region components/common/resize-observer/Collection.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { isFunction as e } from "../utils/is.js";
|
|
3
3
|
import { getReactElementRef as t, supportRef as n, useComposeRef as r } from "../utils/ref.js";
|
|
4
4
|
import i from "../utils/findRootElement.js";
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Collection } from './ResizeObserver';
|
|
2
2
|
declare const ResizeObserver: import("react").ForwardRefExoticComponent<import("./interface").ResizeObserverProps & import("react").RefAttributes<HTMLElement>> & {
|
|
3
|
-
id: string;
|
|
4
3
|
Collection: typeof Collection;
|
|
5
4
|
SingleObserver: import("react").ForwardRefExoticComponent<import("./SingleObserver").SingleObserverProps & import("react").RefAttributes<HTMLElement>>;
|
|
5
|
+
zh: string;
|
|
6
|
+
en: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
id: string;
|
|
6
9
|
};
|
|
7
10
|
export { Collection };
|
|
8
11
|
export default ResizeObserver;
|
package/resize-observer/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { RESIZE_OBSERVER_COMPONENT_INFO as e } from "../utils/names.js";
|
|
3
3
|
import { Collection as t } from "./Collection.js";
|
|
4
4
|
import n from "./SingleObserver.js";
|
|
5
5
|
import r from "./ResizeObserver.js";
|
|
6
6
|
//#region components/common/resize-observer/index.ts
|
|
7
7
|
var i = Object.assign(r, {
|
|
8
|
-
|
|
8
|
+
...e,
|
|
9
9
|
Collection: t,
|
|
10
10
|
SingleObserver: n
|
|
11
11
|
});
|
package/space/Space.js
CHANGED
package/space/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { SpaceVertical } from './Space';
|
|
2
2
|
declare const Space: import("react").ForwardRefExoticComponent<import("./interface").SpaceProps & import("react").RefAttributes<unknown>> & {
|
|
3
|
-
id: string;
|
|
4
3
|
Vertical: import("react").ForwardRefExoticComponent<import("./interface").SpaceVerticalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
zh: string;
|
|
5
|
+
en: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
id: string;
|
|
5
8
|
};
|
|
6
9
|
export { SpaceVertical };
|
|
7
10
|
export default Space;
|
package/space/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { SPACE_COMPONENT_INFO as e } from "../utils/names.js";
|
|
3
3
|
import t, { SpaceVertical as n } from "./Space.js";
|
|
4
4
|
//#region components/common/space/index.ts
|
|
5
5
|
var r = Object.assign(t, {
|
|
6
|
-
|
|
6
|
+
...e,
|
|
7
7
|
Vertical: n
|
|
8
8
|
});
|
|
9
9
|
//#endregion
|
package/style/animation.less
CHANGED
|
@@ -6,27 +6,3 @@
|
|
|
6
6
|
.@{ui-common-prefix}-animation-vibrate {
|
|
7
7
|
animation: ~'@{ui-common-prefix}-keyframes-vibrate' 0.3s linear infinite both;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
.@{ui-common-prefix}-animation-blink-appear,
|
|
11
|
-
.@{ui-common-prefix}-animation-blink-appear-active,
|
|
12
|
-
.@{ui-common-prefix}-animation-blink-enter,
|
|
13
|
-
.@{ui-common-prefix}-animation-blink-enter-active,
|
|
14
|
-
.@{ui-common-prefix}-animation-blink-exit,
|
|
15
|
-
.@{ui-common-prefix}-animation-blink-exit-active {
|
|
16
|
-
transition: opacity 0.3s linear;
|
|
17
|
-
}
|
|
18
|
-
.@{ui-common-prefix}-animation-blink-appear,
|
|
19
|
-
.@{ui-common-prefix}-animation-blink-enter,
|
|
20
|
-
.@{ui-common-prefix}-animation-blink-exit-active {
|
|
21
|
-
opacity: 0;
|
|
22
|
-
}
|
|
23
|
-
.@{ui-common-prefix}-animation-blink-appear-active,
|
|
24
|
-
.@{ui-common-prefix}-animation-blink-enter-active,
|
|
25
|
-
.@{ui-common-prefix}-animation-blink-exit {
|
|
26
|
-
opacity: 1;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.@{ui-common-prefix}-animation-blink-appear-done,
|
|
30
|
-
.@{ui-common-prefix}-animation-blink-enter-done {
|
|
31
|
-
animation: ~'@{ui-common-prefix}-keyframes-blink' 0.5s linear;
|
|
32
|
-
}
|
package/style/global.less
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
.@{ui-common-prefix}-display-none {
|
|
2
|
-
display: none
|
|
2
|
+
display: none;
|
|
3
|
+
}
|
|
4
|
+
.@{ui-common-prefix}-display-contents {
|
|
5
|
+
display: contents;
|
|
3
6
|
}
|
|
4
7
|
.@{ui-common-prefix}-visibility-hidden {
|
|
5
|
-
visibility: hidden
|
|
8
|
+
visibility: hidden;
|
|
6
9
|
}
|
|
7
10
|
|
|
8
11
|
.@{ui-common-prefix}-overflow-hidden {
|
|
@@ -33,13 +36,22 @@
|
|
|
33
36
|
line-height: 1;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
|
-
.@{ui-common-prefix}-text-overflow-ellipsis
|
|
39
|
+
.@{ui-common-prefix}-text-overflow-ellipsis,
|
|
40
|
+
.@{ui-common-prefix}-line-clamp,
|
|
41
|
+
.@{ui-common-prefix}-line-clamp-1,
|
|
42
|
+
.@{ui-common-prefix}-line-clamp-2,
|
|
43
|
+
.@{ui-common-prefix}-line-clamp-3,
|
|
44
|
+
.@{ui-common-prefix}-line-clamp-4,
|
|
45
|
+
.@{ui-common-prefix}-line-clamp-5 {
|
|
37
46
|
text-overflow: ellipsis;
|
|
38
|
-
white-space:
|
|
39
|
-
word-break: break-all;
|
|
47
|
+
white-space: normal;
|
|
40
48
|
overflow: hidden;
|
|
41
49
|
}
|
|
42
|
-
|
|
50
|
+
.@{ui-common-prefix}-text-overflow-ellipsis {
|
|
51
|
+
word-break: break-all;
|
|
52
|
+
}
|
|
53
|
+
.@{ui-common-prefix}-line-clamp,
|
|
54
|
+
.@{ui-common-prefix}-line-clamp-1,
|
|
43
55
|
.@{ui-common-prefix}-line-clamp-2,
|
|
44
56
|
.@{ui-common-prefix}-line-clamp-3,
|
|
45
57
|
.@{ui-common-prefix}-line-clamp-4,
|
|
@@ -47,9 +59,11 @@
|
|
|
47
59
|
display: -webkit-box;
|
|
48
60
|
display: -moz-box;
|
|
49
61
|
-webkit-box-orient: vertical;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
62
|
+
}
|
|
63
|
+
.@{ui-common-prefix}-line-clamp,
|
|
64
|
+
.@{ui-common-prefix}-line-clamp-1 {
|
|
65
|
+
line-clamp: 1;
|
|
66
|
+
-webkit-line-clamp: 1;
|
|
53
67
|
}
|
|
54
68
|
.@{ui-common-prefix}-line-clamp-2 {
|
|
55
69
|
line-clamp: 2;
|
|
@@ -67,3 +81,19 @@
|
|
|
67
81
|
line-clamp: 5;
|
|
68
82
|
-webkit-line-clamp: 5;
|
|
69
83
|
}
|
|
84
|
+
|
|
85
|
+
.@{ui-common-prefix}-full-size {
|
|
86
|
+
width: 100%;
|
|
87
|
+
height: 100%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.@{ui-common-prefix}-flex-center {
|
|
91
|
+
display: flex;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
align-items: center;
|
|
94
|
+
}
|
|
95
|
+
.@{ui-common-prefix}-inline-flex-center {
|
|
96
|
+
display: inline-flex;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
align-items: center;
|
|
99
|
+
}
|
package/style/index.less
CHANGED
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
@import './keyframes.less';
|
|
4
4
|
@import './animation.less';
|
|
5
|
+
@import './transition.less';
|
|
5
6
|
@import './variables.less';
|
|
6
7
|
@import './normalize.less';
|
|
7
8
|
@import './global.less';
|
|
8
9
|
@import './override.less';
|
|
9
10
|
|
|
10
11
|
:root {
|
|
11
|
-
|
|
12
|
+
color-scheme: auto;
|
|
13
|
+
// interpolate-size: allow-keywords; // 备注:启用此属性会导致 tree 树组件的展开折叠动画效果出现异常,排查树组件的动画出现异常浪费了我一天的时间,非常不值得呀。Sat May 23 19:46:38 CST 2026
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
body {
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
.@{ui-pc-theme-dark-class-name},
|
package/style/normalize.less
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
details {
|
|
2
|
+
interpolate-size: allow-keywords;
|
|
3
|
+
}
|
|
4
|
+
details::details-content {
|
|
5
|
+
content-visibility: visible;
|
|
6
|
+
height: 0;
|
|
7
|
+
transition: 0.2s ease-out;
|
|
8
|
+
// overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
details[open]::details-content {
|
|
11
|
+
height: auto;
|
|
12
|
+
height: calc-size(auto, size);
|
|
13
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.@{ui-common-prefix}-fade-appear,
|
|
2
|
+
.@{ui-common-prefix}-fade-appear-active,
|
|
3
|
+
.@{ui-common-prefix}-fade-enter,
|
|
4
|
+
.@{ui-common-prefix}-fade-enter-active,
|
|
5
|
+
.@{ui-common-prefix}-fade-exit,
|
|
6
|
+
.@{ui-common-prefix}-fade-exit-active,
|
|
7
|
+
.@{ui-common-prefix}-blink-appear,
|
|
8
|
+
.@{ui-common-prefix}-blink-appear-active,
|
|
9
|
+
.@{ui-common-prefix}-blink-enter,
|
|
10
|
+
.@{ui-common-prefix}-blink-enter-active,
|
|
11
|
+
.@{ui-common-prefix}-blink-exit,
|
|
12
|
+
.@{ui-common-prefix}-blink-exit-active {
|
|
13
|
+
transition: opacity 0.27s ease-out;
|
|
14
|
+
}
|
|
15
|
+
.@{ui-common-prefix}-fade-appear,
|
|
16
|
+
.@{ui-common-prefix}-fade-enter,
|
|
17
|
+
.@{ui-common-prefix}-fade-exit-active,
|
|
18
|
+
.@{ui-common-prefix}-fade-exit-done,
|
|
19
|
+
.@{ui-common-prefix}-blink-appear,
|
|
20
|
+
.@{ui-common-prefix}-blink-enter,
|
|
21
|
+
.@{ui-common-prefix}-blink-exit-active {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
}
|
|
24
|
+
.@{ui-common-prefix}-fade-appear-active,
|
|
25
|
+
.@{ui-common-prefix}-fade-enter-active,
|
|
26
|
+
.@{ui-common-prefix}-fade-enter-done,
|
|
27
|
+
.@{ui-common-prefix}-fade-exit,
|
|
28
|
+
.@{ui-common-prefix}-blink-appear-active,
|
|
29
|
+
.@{ui-common-prefix}-blink-enter-active,
|
|
30
|
+
.@{ui-common-prefix}-blink-exit {
|
|
31
|
+
opacity: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.@{ui-common-prefix}-blink-appear-done,
|
|
35
|
+
.@{ui-common-prefix}-blink-enter-done,
|
|
36
|
+
.@{ui-common-prefix}-blink-exit-done {
|
|
37
|
+
animation: ~'@{ui-common-prefix}-keyframes-blink' 0.5s linear;
|
|
38
|
+
}
|
|
39
|
+
.@{ui-common-prefix}-blink-exit-done {
|
|
40
|
+
animation-direction: reverse;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.@{ui-common-prefix}-scale-appear,
|
|
44
|
+
.@{ui-common-prefix}-scale-appear-active,
|
|
45
|
+
.@{ui-common-prefix}-scale-enter,
|
|
46
|
+
.@{ui-common-prefix}-scale-enter-active,
|
|
47
|
+
.@{ui-common-prefix}-scale-exit,
|
|
48
|
+
.@{ui-common-prefix}-scale-exit-active {
|
|
49
|
+
transition: all 0.27s cubic-bezier(0.3, 1.3, 0.3, 1);
|
|
50
|
+
}
|
|
51
|
+
.@{ui-common-prefix}-scale-appear,
|
|
52
|
+
.@{ui-common-prefix}-scale-enter,
|
|
53
|
+
.@{ui-common-prefix}-scale-exit-active,
|
|
54
|
+
.@{ui-common-prefix}-scale-exit-done {
|
|
55
|
+
transform: scale(0);
|
|
56
|
+
}
|
|
57
|
+
.@{ui-common-prefix}-scale-appear-active,
|
|
58
|
+
.@{ui-common-prefix}-scale-enter-active,
|
|
59
|
+
.@{ui-common-prefix}-scale-appear-done,
|
|
60
|
+
.@{ui-common-prefix}-scale-enter-done,
|
|
61
|
+
.@{ui-common-prefix}-scale-exit {
|
|
62
|
+
transform: scale(1);
|
|
63
|
+
}
|
package/style/variables.less
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@ui-common-prefix: pqbc;
|
package/style.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:root{--pi:3.14159}@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:1s cubic-bezier(0,0,1,1) infinite pqbc-keyframes-rotate-360deg}.pqbc-animation-vibrate{animation:.3s linear infinite both pqbc-keyframes-vibrate}.pqbc-
|
|
1
|
+
:root{--pi:3.14159}@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:1s cubic-bezier(0,0,1,1) infinite pqbc-keyframes-rotate-360deg}.pqbc-animation-vibrate{animation:.3s linear infinite both pqbc-keyframes-vibrate}.pqbc-fade-appear,.pqbc-fade-appear-active,.pqbc-fade-enter,.pqbc-fade-enter-active,.pqbc-fade-exit,.pqbc-fade-exit-active,.pqbc-blink-appear,.pqbc-blink-appear-active,.pqbc-blink-enter,.pqbc-blink-enter-active,.pqbc-blink-exit,.pqbc-blink-exit-active{transition:opacity .27s ease-out}.pqbc-fade-appear,.pqbc-fade-enter,.pqbc-fade-exit-active,.pqbc-fade-exit-done,.pqbc-blink-appear,.pqbc-blink-enter,.pqbc-blink-exit-active{opacity:0}.pqbc-fade-appear-active,.pqbc-fade-enter-active,.pqbc-fade-enter-done,.pqbc-fade-exit,.pqbc-blink-appear-active,.pqbc-blink-enter-active,.pqbc-blink-exit{opacity:1}.pqbc-blink-appear-done,.pqbc-blink-enter-done,.pqbc-blink-exit-done{animation:.5s linear pqbc-keyframes-blink}.pqbc-blink-exit-done{animation-direction:reverse}.pqbc-scale-appear,.pqbc-scale-appear-active,.pqbc-scale-enter,.pqbc-scale-enter-active,.pqbc-scale-exit,.pqbc-scale-exit-active{transition:all .27s cubic-bezier(.3,1.3,.3,1)}.pqbc-scale-appear,.pqbc-scale-enter,.pqbc-scale-exit-active,.pqbc-scale-exit-done{transform:scale(0)}.pqbc-scale-appear-active,.pqbc-scale-enter-active,.pqbc-scale-appear-done,.pqbc-scale-enter-done,.pqbc-scale-exit{transform:scale(1)}details{interpolate-size:allow-keywords}details::details-content{content-visibility:visible;height:0;transition:all .2s ease-out}details[open]::details-content{height:auto;height:calc-size(auto, size)}.pqbc-display-none{display:none}.pqbc-display-contents{display:contents}.pqbc-visibility-hidden{visibility:hidden}.pqbc-overflow-hidden{overflow:hidden}.pqbc-cursor-pointer{cursor:pointer}.pqbc-filter-invert-100{filter:invert()}.pqbc-filter-grayscale-100{filter:grayscale()}.pqbc-isolation-isolate{isolation:isolate}.pqbc-direction-rtl{direction:rtl}.pqbc-line-height-1{line-height:1}.pqbc-text-overflow-ellipsis,.pqbc-line-clamp,.pqbc-line-clamp-1,.pqbc-line-clamp-2,.pqbc-line-clamp-3,.pqbc-line-clamp-4,.pqbc-line-clamp-5{text-overflow:ellipsis;white-space:normal;overflow:hidden}.pqbc-text-overflow-ellipsis{word-break:break-all}.pqbc-line-clamp,.pqbc-line-clamp-1,.pqbc-line-clamp-2,.pqbc-line-clamp-3,.pqbc-line-clamp-4,.pqbc-line-clamp-5{-webkit-box-orient:vertical;display:-webkit-box;display:-moz-box}.pqbc-line-clamp,.pqbc-line-clamp-1{line-clamp:1;-webkit-line-clamp:1}.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}.pqbc-full-size{width:100%;height:100%}.pqbc-flex-center{justify-content:center;align-items:center;display:flex}.pqbc-inline-flex-center{justify-content:center;align-items:center;display:inline-flex}:root{color-scheme:auto}.pqb-theme-dark,.pqbm-theme-dark,.pqb-theme-dark *,.pqbm-theme-dark *{color-scheme:dark}[dir=rtl] *,.pqbc-with-speech-synthesis-rtl{direction:rtl}.pqbc-empty{width:100%}.pqbc-empty .pqbc-empty-description{line-height:1}.pqbc-development{flex-direction:column;justify-content:center;align-items:center;gap:10px;width:100%;height:100%;min-height:300px;display:flex}.pqbc-development-icon,.pqbc-development-img{width:50px;height:50px}.pqbc-development-label{--color-neutral:#868788;color:var(--pqbc-color-neutral-6,var(--pqb-color-neutral-6,var(--pqbm-color-neutral-6,--color-neutral)));font-size:20px}.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;text-align:center;font-size:66px;font-weight:bolder}.pqbc-flex{box-sizing:border-box;margin:0;padding:0;display:flex}.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))));z-index:870227;width:100%;height:2px;position:fixed;inset-block-start:0;inset-inline-start:0}.pqbc-timer-rtl{direction:rtl}.pqbc-border-beam{--pqbc-border-beam-gradient:linear-gradient(to left, rgb(var(--pqbc-primary-5,var(--pqb-primary-5,--pqbm-primary-5))) 0%, rgb(var(--pqbc-cyan-5,var(--pqb-cyan-5,--pqbm-cyan-5))) 36.4%, rgb(var(--pqbc-lime-5,var(--pqb-lime-5,--pqbm-lime-5))) 70%, transparent);--pqbc-border-beam-inset-offset:-1px -1px -1px -1px;--pqbc-border-beam-border-radius:8px;box-sizing:border-box;inset:var(--pqbc-border-beam-inset-offset,0);border-radius:var(--pqbc-border-beam-border-radius,0);z-index:1;pointer-events:none;padding:1px;display:none;position:absolute;overflow:hidden}@supports (mask-composite:exclude) or (-webkit-mask-composite:exclude) or (-webkit-mask-composite:xor){.pqbc-border-beam{mask-image:linear-gradient(#fff 0 0),linear-gradient(#fff 0 0);mask-position:0 0,0 0;mask-size:auto,auto;mask-repeat:repeat,repeat;mask-clip:content-box,border-box;mask-origin:content-box,border-box;mask-composite:exclude;mask-mode:match-source,match-source}@supports (offset-path:rect(0 auto auto 0 round 1px)){.pqbc-border-beam{display:block}.pqbc-border-beam:before{content:"";aspect-ratio:1;opacity:.95;background-image:var(--pqbc-border-beam-gradient,linear-gradient(to left, rgb(var(--pqbc-primary-6,var(--pqb-primary-6,--pqbm-primary-6))) 0%, rgba(var(--pqbc-primary-6,var(--pqb-primary-6,--pqbm-primary-6)), .7) 70%, transparent));offset-anchor:90%50%;offset-distance:0%;offset-path:rect(0 auto auto 0 round 100px);offset-rotate:auto;will-change:offset-distance;width:100px;animation-name:pqbc-border-beam-move;animation-duration:6s;animation-timing-function:linear;animation-iteration-count:infinite;position:absolute;top:0;left:0}@media (prefers-reduced-motion:reduce){.pqbc-border-beam:before{transition:none;animation:none}}}}@media (prefers-reduced-motion:reduce){.pqbc-border-beam:before{display:none}}@keyframes pqbc-border-beam-move{0%{offset-distance:0%}to{offset-distance:100%}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { SUSPENSE_FALLBACK_TEST_COMPONENT_INFO as e } from "../utils/names.js";
|
|
3
3
|
import { forwardRef as t, lazy as n, useImperativeHandle as r, useMemo as i } from "react";
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { SUSPENSE_FALLBACK_TEST_COMPONENT_INFO as e } from "../utils/names.js";
|
|
3
3
|
import t from "./SuspenseFallbackTest.js";
|
|
4
4
|
//#region components/common/suspense-fallback-test/index.ts
|
|
5
|
-
var n = Object.assign(t, {
|
|
5
|
+
var n = Object.assign(t, { ...e });
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
8
8
|
/* 独立思考,明辨是非 */
|
package/test.js
CHANGED
package/timer/Timer.js
CHANGED
package/timer/index.d.ts
CHANGED
package/timer/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { TIMER_COMPONENT_INFO as e } from "../utils/names.js";
|
|
3
3
|
import t from "./Timer.js";
|
|
4
4
|
//#region components/common/timer/index.ts
|
|
5
|
-
var n = Object.assign(t, {
|
|
5
|
+
var n = Object.assign(t, { ...e });
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
8
8
|
/* 独立思考,明辨是非 */
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { TransitionProps } from './interface';
|
|
2
|
-
declare const Transition: import("react").
|
|
2
|
+
declare const Transition: import("react").ForwardRefExoticComponent<TransitionProps & import("react").RefAttributes<unknown>> & {
|
|
3
|
+
zh: string;
|
|
4
|
+
en: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
3
8
|
export { Transition };
|
|
4
9
|
export default Transition;
|
package/transition/Transition.js
CHANGED
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
|
+
import { isExist as e, isFunction as t, isNull as n, isUndefined as r } from "../utils/is.js";
|
|
3
|
+
import i from "../hooks/use-latest/index.js";
|
|
4
|
+
import a from "../hooks/use-memoized-fn/index.js";
|
|
5
|
+
import o from "../hooks/use-create/index.js";
|
|
6
|
+
import s from "../hooks/use-update-effect/index.js";
|
|
7
|
+
import c from "../utils/findRootElement.js";
|
|
7
8
|
import { forceReflow as ee } from "../utils/dom.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { defaults as
|
|
11
|
-
import
|
|
12
|
-
import { TRANSITION_COMPONENT_INFO as
|
|
13
|
-
import "
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { jsx as O } from "react/jsx-runtime";
|
|
9
|
+
import te from "../hooks/use-set-state/index.js";
|
|
10
|
+
import l from "../hooks/use-update-layout-effect/index.js";
|
|
11
|
+
import { defaults as ne } from "../utils/lodash.js";
|
|
12
|
+
import re from "../hooks/use-is-first-render/index.js";
|
|
13
|
+
import { TRANSITION_COMPONENT_INFO as u } from "../utils/names.js";
|
|
14
|
+
import { TRANSITION_ADD_END_LISTENER_KEY as d, TRANSITION_ALWAYS_MOUNTED_KEY as ie, TRANSITION_DEFAULT_PROPS as f, TRANSITION_DURATION_KEY as ae, TRANSITION_EVENT_MAP as p, TRANSITION_EVENT_NAME_KEY as oe, TRANSITION_MOUNT_ON_ENTER_KEY as se, TRANSITION_NEXT_PHASE_KEY as ce, TRANSITION_PHASE_APPEAR_DONE as le, TRANSITION_PHASE_APPEAR_KEY as m, TRANSITION_PHASE_APPEAR_START as h, TRANSITION_PHASE_ENTER_DONE as g, TRANSITION_PHASE_ENTER_KEY as _, TRANSITION_PHASE_ENTER_START as ue, TRANSITION_PHASE_EXIT_DONE as v, TRANSITION_PHASE_EXIT_KEY as y, TRANSITION_PHASE_EXIT_START as de, TRANSITION_UNMOUNT_ON_EXIT_KEY as fe } from "./constants.js";
|
|
15
|
+
import { TransitionContext as pe, TransitionGroupContext as me } from "./context.js";
|
|
16
|
+
import { isActivePhaseHandler as he, isAppearPhaseHandler as ge, isEnterPhaseHandler as _e, isExitDonePhaseHandler as ve, isExitPhaseHandler as b, transitionNormalizeDurations as ye } from "./utils.js";
|
|
17
|
+
import { forwardRef as x, useContext as S, useDeferredValue as C, useEffect as w, useImperativeHandle as T, useLayoutEffect as E, useRef as D, useTransition as O } from "react";
|
|
18
|
+
import { jsx as k } from "react/jsx-runtime";
|
|
19
19
|
//#region components/common/transition/Transition.tsx
|
|
20
|
-
var { setTimeout:
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
let x =
|
|
24
|
-
|
|
25
|
-
let V =
|
|
26
|
-
"unmountOnExit" in x && !
|
|
27
|
-
let W = "mountOnEnter" in x && !
|
|
20
|
+
var { setTimeout: A, clearTimeout: j, requestAnimationFrame: M, cancelAnimationFrame: N } = window, P = { ...f };
|
|
21
|
+
function F(u, f) {
|
|
22
|
+
S(me);
|
|
23
|
+
let x = ne({}, u, P), F = "hasShown", I = "refElement", { children: be, in: L, [m]: xe, [_]: Se, [y]: R, [ae]: Ce = 500, [ie]: we, [d]: Te, [se]: z, [fe]: B, [I]: Ee } = x;
|
|
24
|
+
o(() => {}), re();
|
|
25
|
+
let V = D({ [F]: L }), H = V.current[F], U = we;
|
|
26
|
+
"unmountOnExit" in x && !r(B) && (U = !B);
|
|
27
|
+
let W = "mountOnEnter" in x && !r(z);
|
|
28
28
|
W && (H || (U = !z));
|
|
29
|
-
let [G,
|
|
30
|
-
|
|
31
|
-
let [
|
|
29
|
+
let [G, De, Oe] = te(() => X(Y())), { phase: K, destroy: q } = G, J = C(q, q);
|
|
30
|
+
i(K);
|
|
31
|
+
let [ke, Ae] = O();
|
|
32
32
|
function Y() {
|
|
33
|
-
let e =
|
|
34
|
-
return
|
|
33
|
+
let e = v;
|
|
34
|
+
return L && (e = xe ? h : le), e;
|
|
35
35
|
}
|
|
36
36
|
function X(e) {
|
|
37
37
|
return {
|
|
38
38
|
phase: e,
|
|
39
|
-
destroy:
|
|
39
|
+
destroy: je(e)
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
function Z() {
|
|
43
|
-
let { [
|
|
44
|
-
return
|
|
43
|
+
let { [I]: e } = x;
|
|
44
|
+
return c(e);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return U ? void 0 :
|
|
46
|
+
function je(e) {
|
|
47
|
+
return U ? void 0 : ve(e);
|
|
48
48
|
}
|
|
49
|
-
function Q(
|
|
50
|
-
if (
|
|
49
|
+
function Q(e) {
|
|
50
|
+
if (e) {
|
|
51
51
|
{
|
|
52
52
|
let n = Z(), { onBeforePhaseChange: r } = x;
|
|
53
|
-
|
|
53
|
+
t(r) && r(e, n), ee(n);
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
De(X(e));
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
let Me = a((e = !!L) => {
|
|
59
|
+
let t, n = b(K);
|
|
60
|
+
e ? (V.current[F] = !0, n && (t = Se ? ue : g)) : n || (t = R ? de : v), Q(t || K);
|
|
61
|
+
});
|
|
62
|
+
E(() => {
|
|
59
63
|
if (!(W && !z && !H)) {
|
|
60
|
-
let
|
|
61
|
-
|
|
64
|
+
let e = p[K]?.[oe], { [e]: n } = x;
|
|
65
|
+
t(n) && n(Z());
|
|
62
66
|
}
|
|
63
67
|
return () => {};
|
|
64
|
-
}, [K]),
|
|
65
|
-
let { onAfterPhaseChange:
|
|
66
|
-
return e
|
|
67
|
-
}, [K]),
|
|
68
|
-
let e,
|
|
69
|
-
|
|
70
|
-
}, [I]), C(() => {
|
|
71
|
-
let { [u]: n } = x, r = null, i = null, a = p[K]?.[oe];
|
|
72
|
-
if (a && K !== a) if (ue(K)) if (e(n)) n(K, (e = a) => {
|
|
68
|
+
}, [K]), s(() => {
|
|
69
|
+
let { onAfterPhaseChange: e } = x;
|
|
70
|
+
return t(e) && e(K, Z()), () => {};
|
|
71
|
+
}, [K]), l(() => (Me(L), () => {}), [L]), w(() => {
|
|
72
|
+
let { [d]: e } = x, r = null, i = null, a = p[K]?.[ce];
|
|
73
|
+
if (a && K !== a) if (he(K)) if (t(e)) e(K, (e = a) => {
|
|
73
74
|
Q(e || a);
|
|
74
75
|
}, Z());
|
|
75
76
|
else {
|
|
76
|
-
let e =
|
|
77
|
-
t =
|
|
77
|
+
let e = ye(Ce), t = e[_];
|
|
78
|
+
t = ge(K) ? e[m] : _e(K) ? e[_] : b(K) ? e[y] : e[_], r = A((e = a) => {
|
|
78
79
|
Q(e || a);
|
|
79
80
|
}, t, a);
|
|
80
81
|
}
|
|
81
|
-
else i =
|
|
82
|
+
else i = M(() => {
|
|
82
83
|
Q(a);
|
|
83
84
|
});
|
|
84
85
|
return () => {
|
|
85
|
-
|
|
86
|
+
n(r) || j(r), n(i) || N(i);
|
|
86
87
|
};
|
|
87
|
-
}, [K]),
|
|
88
|
-
getState:
|
|
88
|
+
}, [K]), l(() => () => {}, []), E(() => () => {}, []), s(() => () => {}, []), w(() => () => {}, []), T(f, () => ({
|
|
89
|
+
getState: Oe,
|
|
89
90
|
getInitPhase: Y,
|
|
90
91
|
getRootElement: Z
|
|
91
92
|
}));
|
|
92
|
-
let $ =
|
|
93
|
-
return
|
|
93
|
+
let $ = be;
|
|
94
|
+
return r(q) || (R ? L ? q && ($ = null) : J && ($ = null) : L || J && ($ = null)), t($) && ($ = $(x, G, K)), e($) && ($ = /* @__PURE__ */ k(pe.Provider, {
|
|
94
95
|
value: { phase: K },
|
|
95
96
|
children: $
|
|
96
|
-
}), $;
|
|
97
|
+
})), $;
|
|
97
98
|
}
|
|
98
|
-
var
|
|
99
|
-
F.displayName = l.displayName;
|
|
99
|
+
var I = Object.assign(x(F), { ...u });
|
|
100
100
|
//#endregion
|
|
101
|
-
export {
|
|
101
|
+
export { I as Transition, I as default };
|
|
102
102
|
/* 独立思考,明辨是非 */
|